-
Notifications
You must be signed in to change notification settings - Fork 82
Page Development
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.
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.
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.
There are a few cases where it has been necessary to create custom controls. They are discussed in custom controls.