Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 controls from main window?
  • How do I handle transitions (MenuToOptions, OptionsToMenu, GameToOptions etc.)?

The target app is a game but gamedev yielded no responses.

like image 302
Goran Avatar asked Feb 20 '11 14:02

Goran


People also ask

How do I add a SplashScreen in WPF?

To add an existing image as a splash screenAdd the image file to the WPF Application project. In Solution Explorer, select the image. In the Properties window, click the drop-down arrow for the Build Action property. Select SplashScreen from the drop-down list.

What is a WPF SplashScreen?

The SplashScreen allows you to display a Telerik themed control that notifies the user the program is loading. You can customize the image of the splash screen, its animations and loading process visualization.

Is WPF used for standalone and browser hosted applications?

Windows Presentation Foundation (WPF) is a presentation framework that can be used to develop the following types of applications: Standalone Applications (traditional style Windows applications built as executable assemblies that are installed to and run from the client computer).

Does WPF use .NET framework?

The WPF development platform supports a broad set of application development features, including an application model, resources, controls, graphics, layout, data binding, documents, and security. It is a subset of the . NET Framework, so if you have previously built applications with the .


1 Answers

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.

like image 151
devdigital Avatar answered Oct 16 '22 14:10

devdigital