Updating ui from thread c
If you're having trouble understanding what is needed in your sample, you might find Jon Skeet's article useful: are some details in there that I feel differently about, on the whole he describes exactly what I mean when I write "concise-but-complete".Also, for some reason the code is winding up posted without any indentation.Let’s assume that the method “do Some Hard Work()” does something really heavy and that the method “update UI()” updates the interface.Then in the 2nd article I showed an example of updating the user interface in the main thread from an async method.application works on the principle of Thread affinity which means other threads can't interact with each other. Sometimes developers need to manage the thread or update WPF UI.Hi, I have an Asynchronus process that is reporting back to the UI at regular intervals.
As the task was running, on a set interval, the UI would be updated.
The code is much simpler to see what’s going on, but the behaviour is slightly different.
In this example, the code similarly counts upto 5,000,000 and updates the UI label.
Providing a concise sample is mandatory, but it would be nice if you could also figure out the indentation issue. Pete And maybe more about what the problem is, not getting UI, not getting it compiled, not getting Event Monitor. Yes it is easyer to read indented code without blank rows...
seen the same problem with cut/paste in the wrong format, might try going over notepad as in cup and paste to notepad and from there to web...