WP7 forces RootVisual to be PhoneApplicationFrame, any problems?

Jul 23, 2010 at 2:00 AM

I'm still rather green to MVVM frameworks and Caliburn in general, but I recently posted a question on the WP7 forums regarding a concern I had with the beta release:

The question was regarding changing the RootVisual from PhoneApplicationFrame, to something custom, like a ShellViewModel -- the official MS response was "don't do that"


Rob, does this pose any problems or restrictions I need to be concerned about if using CM on a WP7 application?


Jul 23, 2010 at 2:21 PM

Yeah....We've discovered this issue lately. IMO, there are some serious flaws in the WP7 architecure and API design. However, there's probably not much we can do about it right now. I'm going to be sending some time soon playing around with Micro's WP7 Bootstrapper (including using PhoneApplicationFrame as the root visual). My plan is to investigate how screen conductors, etc. would interact with back button nav, tombstoning and launchers/choosers. I hope to have an updated Bootstrapper and some recommendations soon. In the mean time, if you come up with anything interesting, please post ideas/code here.

Jul 29, 2010 at 10:33 PM
Currently I'm trying to "play nice" with the navigation framework. Right now this is by adopting a view first approach, I have a subclass of PhoneApplicationFrame that handles locating the view model (much like ViewLocator in reverse) and binds it to the view. A simple example of this is shown at http://compiledexperience.com/blog/posts/caliburn-on-windows-phone-7 (should work on Caliburn and Caliburn Micro). In the full version of what I've done I've extended that to include plugging in a INavigationService that Presenters can use change the current Page. I also have a IViewModelFactory that takes the current Uri and injects QueryString parameters into the view model.
Jul 30, 2010 at 12:39 AM

That's very similar to what I am working to plug into the framework soon.I don't think there's any way of getting around the core of the app bing View-First nav. But it's still a pretty pleasant dev experience once the proper pieces are in place around that.
I've got some nice stuff for launchers/chooses coming as well. I'll take a look at what you've built and try to learn from it as well. I think CM should be able to provide a nice OOTB solution for WP7 cone I get then new stuff checked in...just a few more details work out.