Thursday, December 11, 2008

Composite WPF Guidance – Part 8 (Creating a Shell)

The shell is the main window of the application where the primary user interface (UI) content is contained. The shell provides the outermost container of your Composite WPF application. You can think Shell as a single main window that contains multiple views. The shell may contain named regions where modules can add views. It may also define certain top-level UI elements, such as the main menu and toolbar. The shell also defines the overall appearance and behavior (look and feel) for the application. It may define styles and borders that are present and visible in the shell layout itself, and it may also define styles, templates, and themes that get applied to the views that are plugged into the shell.
Implementing a Shell consists of creating a WPF window which includes defining several ItemsControls that are identified as regions for modules to add their views to.

The Shell contains a Presenter and is an implementation of the IShellView interface.
The IShellView contains a method signature to launch the Shell form.
void LaunchShell();
The LaunchShell method is called by a BootStrapper to launch the shell form.

No comments: