BackstageTabItem Class

A tab item within a BackstageView.

Namespace: DevExpress.UI.Xaml.Ribbon

Assembly: DevExpress.UI.Xaml.Ribbon.v18.2.dll

Declaration

public class BackstageTabItem :
    RibbonSelectorItemBase,
    ISupportPointer,
    IFlyoutItem,
    IRibbonItemBase,
    ISupportRibbonState,
    IIconProvider,
    ISupportToolTip,
    IBackstageTabItem,
    IBackstageItem,
    IVisualItem,
    ISelectable,
    ISupportOwner<BackstageView>,
    IFlyoutPlaceholder
Public Class BackstageTabItem
    Inherits RibbonSelectorItemBase
    Implements ISupportPointer,
               IFlyoutItem,
               IRibbonItemBase,
               ISupportRibbonState,
               IIconProvider,
               ISupportToolTip,
               IBackstageTabItem,
               IBackstageItem,
               IVisualItem,
               ISelectable,
               ISupportOwner(Of BackstageView),
               IFlyoutPlaceholder

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:

BackstageView

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.

Inheritance

Object
DevExpress.UI.Xaml.Internal.ContentControlEx
DevExpress.UI.Xaml.Internal.PointerItemBase
DevExpress.UI.Xaml.Internal.GlyphItemBase
DevExpress.UI.Xaml.Ribbon.Internal.RibbonItemBase
DevExpress.UI.Xaml.Ribbon.Internal.RibbonItemBaseEx
DevExpress.UI.Xaml.Ribbon.Internal.RibbonSelectorItemBase
BackstageTabItem

See Also