I'm about to start my first silverlight project (Silverlight 4.0) and have spent some time researching best approaches etc. I'm going to be using MVVM and have spent last few days looking at navigation.
First of all, I noticed that a lot of MVVM examples don't implement the MainPage as a View/View Model. The MainPage contains the nav frame and Uri Mappings and then navigate to pages which follow view/view model. Is it standard when using MVVM and the navigation service that the main page is not implemented as a View/View Model? For example, the Silverlight 4 training kit contains the event manager sample and the Main Page there has lots of code behind, i.e. handling navigation events like Navigated and NavigatedFailed. But all other pages are View/View Models.
Second, with the navigation service the logic to change the navigation is now done by the View and not controlled by the View Model (which goes against some of the ideas behind MVVM). Some approaches on the net use messaging from the ViewModel to the View, or pass the Navigation service to the ViewModel and the navigation controlled there. Are either of these approaches better than the other?
Ideally, I'd like to find an example where the Main Page follows View/ViewModel and the ViewModel controls the navigation and the Views are free from code behind. Am I asking too much??!
FYI I'm not using PRISM or MVVM Light.
Cheers