App screens management in WPF
What would be the preferred way of handling app screens in WPF (conforming to MVVM)? Silverlight suggeestions are also ok.
I'm not asking about app states (see MVVM Screen Management) but the actual mechanics of presenting various screens.
- Do I implement screens as user controls? Pages?
- Do I collapse and show controls or dynamically add and remove co开发者_开发百科ntrols from main window?
- How do I handle transitions (MenuToOptions, OptionsToMenu, GameToOptions etc.)?
The target app is a game but gamedev yielded no responses.
I would look into an MVVM framework such as Caliburn.Micro which has the concepts of Screens and Conductors. There are two Conductor implementations which come with Caliburn.Micro, or you can develop your own as required.
Rob talks about the concepts of Screens, Conductors, and Composition here.
The latest source also includes a GameLibrary sample which Rob discusses in his original Build Your Own MVVM Framework talk (EX15), which would be a good starting point.
精彩评论