Skip to content
Mark edited this page Aug 27, 2013 · 11 revisions

This article will discuss how to create MBT pages. This will assume a working knowledge of WPF.

It is important to follow these guidelines in order to build pages that will be compatible with any theme. Pages that are owned by themes should follow them as well in order to ensure consistency in the presentation.

Creating the Page

Add a new Page to your project. Is is recommended, but not required, that all pages inherit from MediaBrowser.Theater.Presentation.Pages.BasePage. This subclass provides some basic enhancements that will be needed such as retaining focus when leaving a page and coming back.

Guidelines

Use standard WPF controls as much as possible. MBT has styles in resource files that will provide the look and feel for many of the built-in controls, such as Button, CheckBox, RadioButton, Slider, TextBlock, TextBox, etc.

If you use sub-classes, or other custom controls, you may not receive the core styles.

The current theme will override these styles as desired. For consistency it is important that individual pages do not override these styles, except for individual elements that are truly unique.

Custom Controls

There are a few cases where it has been necessary to create custom controls. They are discussed in custom controls.