In Silverlight, how do you know if code works in a user interface thread or not?

Basically, I need to know if I need Dispatcher.BeginInvoke or if it is not needed.

Thanks.

+5
source share
1 answer

You can use the method Dispatcher.CheckAccess. It returns true if you are in the same thread as the UI manager, and false otherwise

+10
source

All Articles