BackstageTabItem Class
A tab item within a BackstageView.
Namespace: DevExpress.UI.Xaml.Ribbon
Assembly: DevExpress.UI.Xaml.Ribbon.v21.2.dll
NuGet Package: DevExpress.Uwp.Controls
Declaration
[Bindable]
[ContentProperty(Name = "ControlPane")]
[TemplatePart(Name = "PART_Flyout", Type = typeof(NestedMenuFlyoutControl))]
public class BackstageTabItem :
RibbonSelectorItemBase,
IBackstageTabItem,
IBackstageItem,
IVisualItem,
ISelectable,
ISupportOwner<BackstageView>,
IFlyoutPlaceholder
Remarks
A tab item is a clickable element within a BackstageView, structurally consisting of the content and control pane areas. The image below illustrates a visual tab item’s areas allocation:
The backstage item content is specified by its Content property.
The control pane is displayed when the tab item is selected. Its content is specified by the BackstageTabItem.ControlPane property that can be initialized with a single object only. To display multiple controls within the control pane, add the desired controls to a container (such as Grid or StackPanel) and initialize the BackstageTabItem.ControlPane property with this container.
To add a tab item, insert a new BackstageTabItem instance in the BackstageView‘s Items collection. In XAML, define a BackstageTabItem object between the BackstageView opening and closing tags. See the example below.
<Ribbon:RibbonControl.BackstageView>
<Ribbon:BackstageView Caption="Menu">
<Ribbon:BackstageTabItem Content="Close" >
<StackPanel>
<TextBlock Text="Select whether to save or discard changes before closing the application." />
<Button Content="Save and close" Command="{x:Bind ViewModel.SaveAndCloseCommand}" />
<Button Content="Close without saving" Command="{x:Bind ViewModel.DiscardAndCloseCommand}" />
</StackPanel>
</Ribbon:BackstageTabItem>
</Ribbon:BackstageView>
One of the tab items in a BackstageView is selected by default. This ensures that the control pane area always displays some content. By default, the first tab item defined in code or XAML is selected. You can set a custom default tab item using the BackstageView.SelectedTabOnShow or BackstageView.SelectedTabIndexOnShow property. The currently selected tab can also be accessed through the RibbonControlBase.SelectedTabCaption or BackstageView.SelectedTab property.