SL – how to grab dispatcher, random tips

Q: how many dispatchers are there in one SL process?
%%A: 1, according to many c# guys. However, a lot of literature mentions “a dispatcher”

Q: can you get hold of the dispatcher from Any thread Always?
A: http://www.jeff.wilcox.name/2010/04/propertychangedbase-crossthread/ says not always

Q: which source is best to get the dispatcher?
A: Deployment.Current.Dispatcher is preferred over Application.Current.RootVisual.Dispatcher. See http://www.jeff.wilcox.name/2010/04/propertychangedbase-crossthread/ and other sites

Q: Is SynchronizationContext better than dispatcher?
A: http://www.jeff.wilcox.name/2010/04/propertychangedbase-crossthread/ says dispatcher is easier
A: http://dotnetslackers.com/articles/silverlight/Multithread-Programming-in-Silverlight-4.aspx demonstrates both.

Q: how many UI threads are there?
%%A: 1, according to many c# guys.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s