BackstageViewControl Class
Allows you to create a Microsoft Office 2010-like main menu in your applications.
Namespace: DevExpress.Xpf.Ribbon
Assembly: DevExpress.Xpf.Ribbon.v14.2.dll
#Declaration
[DXToolboxBrowsable]
[ToolboxTabName("DX.14.2: Navigation & Layout")]
public class BackstageViewControl :
ItemsControl,
IComplexLayout
#Remarks
The BackstageViewControl allows you to recreate a Microsoft Office 2010 application main menu. When displayed within a RibbonControl this menu stretches to fill an entire window (compared with the ApplicationMenu which is not automatically stretched). The image below illustrates a sample BackstageViewControl:
To link a BackstageViewControl with a RibbonControl, initialize the RibbonControl.ApplicationMenu property with a new BackstageViewControl object.
The BackstageViewControl allows you to use three types of items.
- The BackstageButtonItem is a regular element, similar to a common button. Use the BackstageButtonItemto execute certain actions (like opening a file or closing an application) when the button is clicked. The BackstageButtonItem.Command property and BackstageItemBase.Click event allow you to implement an action.
- The BackstageTabItem structurally consists of the content (caption) and control pane areas. Along with BackstageButtonItems, tab item contents are displayed at the BackstageViewControl's left edge. When an end-user selects a tab item, the tab item expands to the right and the control pane is displayed. To specify controls to be displayed in this area, use the BackstageTabItem.ControlPane property. Typically, each control pane displays controls that have a certain feature in common. For instance, the 'Save' item in MS Word unites a set of controls that provide different options for saving a document. A 'Recent' tab item in the figure above combines four controls (links to recently opened files).
- The BackstageSeparatorItem visually separates neighboring backstage items with a horizontal line.
The BackstageViewControl is inherited from the ItemsControl and stores items in an Items collection. Use this collection to add new backstage items via code. To do it in a XAML markup, place a new instance of a backstage item's class between the opening and closing tags of BackstageViewControl. The Items collection is marked with the ContentPropertyAttribute for the BackstageViewControl. This means that you can add new backstage items to the Items collection in XAML by defining these objects between the opening and closing tags of the BackstageViewControl. The BackstageViewControl.Tabs list allows you to access all existing tab items in a BackstageViewControl. Unlike an Items collection, the BackstageViewControl.Tabs list is read-only, so it can't be modified via code and a XAML markup.
The BackstageViewControl can be customized in a many ways. For example, use the BackstageViewControl.BackgroundGlyph property to set an image for display in the BackstageViewControl's right bottom corner. You can manually set an area's width where item contents are displayed with the help of the BackstageViewControl.TabPaneMinWidth property. A set of style members allows you to set general appearance settings for both the content and control pane areas.