WPF, Delegates and Threads
November 8th, 2008
2 comments
Introduction:
When I started programming for the .NET Micro Framework one of the things that where a bit difficult to grab was how to update WPF UI elements (Like a text control) from a thread.
It has all to do with thread safety. Threads run (semi) simultainus and so there is the change that you access the same variable at the same time. When you have you’re own variables that you want make "Thread-Safe" you can use the lock statement (MSDN). When you’re developing for WPF you can use the Dispatcher and DispatcherTimer to "Thread-Safe" access UI controls.
Recent Comments