Can somebody help me understand what the real difference is and why the MVVM Light toolkit users UserControl’s for Views instead of Pages? I know there are some inherient differences between UserControl’s and pages like access to the “NavigationService” on a page.
And some of the examples from John Papa’s implementation of the MVVM Light use Page instead UserControl, but if you use the MVVM Light “View” Template it uses a UserControl.
thanks
dbl
A
Pagewithin a Silverlight application is designed to be hosted within aFrame– and is part of the navigation framework (see the MSDN Navigation Overview documentation). Applications of this style navigate from page to page, with the URL updating to reflect the current location, in much the same way as HTML-based websites.A
UserControl, is a re-useable unit of your user-interface. It is typically composed of a number of controls, UI elements – and may have some code-behind to perform logic.If MVVM Light used Pages instead of UserControls, the framework would only be useful for navigation-based Silverlight applications, which are not terribly popular. However, UserControls can be hosted inside any other Panel or Page, therefore this approach is more flexible. A
UserControlcan be used as the content of aPage, but can also be used in many other contexts.