WP7 ProgressIndicator

Feb 8, 2012 at 8:58 PM
Edited Feb 8, 2012 at 9:23 PM

What's the best way to access the SystemTray ProgressIndicator without referencing the View in the ViewModel?  Has anyone done this.  


edit: I guess you don't need to reference the View as you can cast it to PhoneApplicaitonPage. I was more wondering if there'd be a way to do this sort of like how the AppBarButton stuff works.  If the view is a PhoneApplicationPage and the VM implements an interface it binds them or something.


edit2: or I can use google, http://blog.caraulean.com/2011/12/09/using-wp7s-progressindicator-with-caliburn-micro/

Feb 8, 2012 at 9:42 PM

I was about to suggest exactly that post.
Another (less explicit) option is using the Event Aggregator.

Feb 22, 2012 at 1:15 AM

I use a custom IResult that references the View, lets you test your view model without the View.

The source is available at https://bitbucket.org/nigel.sampson/compiled-experience-toolkit/src/3adc45f2d738/Toolkit/Framework/ProgressResult.cs