Silverlight and callbacks in non-UI threads

Does Silverlight support callback in a non-UI thread after an Async task (such as listening for events or a network request)?

Suppose I created my own threads.

Thanks Rui

+4
source share
2 answers

Yes, an Async task often (though not always) calls a callback on a thread other than the UI thread. Therefore, the existence of the Dispatcher property in everything that has a user interface (and even this is not so). You need to make sure that the code to run in the user interface is invoked in the user interface thread.

Unfortunately, the documentation about what may and cannot be changed from a thread other than the UI is very small, most likely because it can change from one version to another.

+6
source

If you follow the MVVM pattern and you create an asynchronous WCF call in your view model (since all calls are aync in Silverlight), the callback works even if you leave your current page in the navigation application, it can be annoying if your callback redirects to another page with success!

+2
source

All Articles