Click here to Skip to main content
15,922,007 members
Home / Discussions / C#
   

C#

 
Questionplz give guideline.. Pin
Pragya727-Sep-11 1:22
Pragya727-Sep-11 1:22 
AnswerRe: plz give guideline.. Pin
Richard MacCutchan27-Sep-11 1:33
mveRichard MacCutchan27-Sep-11 1:33 
GeneralRe: plz give guideline.. Pin
Pragya730-Sep-11 0:16
Pragya730-Sep-11 0:16 
AnswerRe: plz give guideline.. PinPopular
BobJanova27-Sep-11 1:39
BobJanova27-Sep-11 1:39 
AnswerRe: plz give guideline.. Pin
Pete O'Hanlon27-Sep-11 3:02
mvePete O'Hanlon27-Sep-11 3:02 
AnswerRe: plz give guideline.. Pin
RichardGrimmer28-Sep-11 6:25
RichardGrimmer28-Sep-11 6:25 
QuestionC# InvokeRequired into WPF Pin
iresh8827-Sep-11 0:53
iresh8827-Sep-11 0:53 
AnswerRe: C# InvokeRequired into WPF Pin
BobJanova27-Sep-11 1:36
BobJanova27-Sep-11 1:36 
You cannot access UI controls from another thread. Use the Dispatcher. In this case you've simply got your if test the wrong way around, though I think Dispatcher.RequiresInvoke or something like that will be better.

On a broader level, though, your data reading thread shouldn't be directly setting things in the view anyway. It should notify the view model that the game data has changed, probably by assigning to a property on the view model, and then that should notify the view. The data binding in WPF should manage the cross thread issue itself in that case.
GeneralRe: C# InvokeRequired into WPF Pin
Ian Shlasko27-Sep-11 2:57
Ian Shlasko27-Sep-11 2:57 
GeneralRe: C# InvokeRequired into WPF Pin
iresh8827-Sep-11 4:28
iresh8827-Sep-11 4:28 
GeneralRe: C# InvokeRequired into WPF Pin
BobJanova27-Sep-11 5:15
BobJanova27-Sep-11 5:15 
Questionhow to identify my screen data? Pin
neodeaths26-Sep-11 23:46
neodeaths26-Sep-11 23:46 
AnswerRe: how to identify my screen data? Pin
Pete O'Hanlon27-Sep-11 0:19
mvePete O'Hanlon27-Sep-11 0:19 
GeneralMy vote of one Pin
Eddy Vluggen28-Sep-11 7:29
professionalEddy Vluggen28-Sep-11 7:29 
GeneralRe: My vote of one Pin
Pete O'Hanlon28-Sep-11 7:57
mvePete O'Hanlon28-Sep-11 7:57 
GeneralRe: My vote of one Pin
Eddy Vluggen28-Sep-11 8:15
professionalEddy Vluggen28-Sep-11 8:15 
GeneralRe: My vote of one Pin
Pete O'Hanlon28-Sep-11 8:26
mvePete O'Hanlon28-Sep-11 8:26 
GeneralRe: My vote of one Pin
Eddy Vluggen28-Sep-11 9:53
professionalEddy Vluggen28-Sep-11 9:53 
AnswerRe: how to identify my screen data? Pin
Eddy Vluggen27-Sep-11 6:15
professionalEddy Vluggen27-Sep-11 6:15 
GeneralRe: how to identify my screen data? Pin
neodeaths27-Sep-11 20:46
neodeaths27-Sep-11 20:46 
GeneralRe: how to identify my screen data? Pin
Eddy Vluggen28-Sep-11 7:33
professionalEddy Vluggen28-Sep-11 7:33 
GeneralRe: how to identify my screen data? Pin
Pete O'Hanlon28-Sep-11 8:11
mvePete O'Hanlon28-Sep-11 8:11 
Questionquestion about programming for interacting with my desktop controls Pin
neodeaths26-Sep-11 23:43
neodeaths26-Sep-11 23:43 
AnswerRe: question about programming for interacting with my desktop controls Pin
André Kraak27-Sep-11 2:06
André Kraak27-Sep-11 2:06 
QuestionMarshal an int array with unkown length at class construction Pin
Member 788975126-Sep-11 23:38
Member 788975126-Sep-11 23:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.