WP7 - How to Dispatch to UI thread

Oct 23, 2010 at 3:36 AM

I'm writing a WP7 app. I have A VM inherited from Screen. 

I'm trying to call some code that needs to run on the UI thread. Pre-Caliburn I would wrap the code in a Dispatcher.BeginInvoke.

What is the CM way of doing this?

I have read the docs but am confused - should I use an Action, grab the view somehow, something else ?



Oct 23, 2010 at 8:12 AM
Edited Oct 23, 2010 at 8:17 AM
You can directly call:
which in turns calls Dispatcher.
Note that, in some scenarios, CM already take this into account.

Oct 23, 2010 at 8:42 PM

Works a treat. Thanks Marco.