HypernovaDesktop Components · docs
Binarymission
WPF › Ribbon › BinaryRibbonBackstageApplicationMenu

BinaryRibbonBackstageApplicationMenu

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.Office

An application button whose menu opens as a panel across the width of the window – a backstage view - holding whatever elements the application puts in it.

public class BinaryRibbonBackstageApplicationMenu : MenuItem, IBinaryRibbonKeyTipControl, IBinaryRibbonApplicationMenu

Inherits from / implements: MenuItem, IBinaryRibbonKeyTipControl, IBinaryRibbonApplicationMenu

Remarks

Assign it to BinaryRibbonBarPanel.ApplicationMenu in place of a BinaryRibbonApplicationMenu. Its items are shown as they are, not wrapped as menu items, in a panel as wide as the BinaryRibbonWindow's Width less 8 logical pixels: lay out an Info, Open or Print page with ordinary WPF elements. A click on a MenuItem inside it closes it.

Examples

<bm:BinaryRibbonBarPanel.ApplicationMenu>
    <bm:BinaryRibbonBackstageApplicationMenu bm:BinaryKeyTip.AccessKey="F">
        <Grid Height="420">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="180" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <StackPanel>
                <bm:BinaryRibbonMenuItem Header="Info" Click="OnShowInfo" />
                <bm:BinaryRibbonMenuItem Header="Export" Click="OnShowExport" />
                <bm:BinaryRibbonMenuItem Header="Close" Click="OnCloseDocument" />
            </StackPanel>
            <ContentControl Grid.Column="1" Content="{Binding BackstagePage}" />
        </Grid>
    </bm:BinaryRibbonBackstageApplicationMenu>
</bm:BinaryRibbonBarPanel.ApplicationMenu>

See also

Members at a glance

Constructors
BinaryRibbonBackstageApplicationMenuCreates an empty backstage menu. A click on any menu item inside it closes it.
Properties
ButtonImageGets or sets the picture on the application button.
IsOpenGets or sets whether the backstage panel is open.
Methods
GetContainerForItemOverrideCreates a BinaryRibbonMenuItem; not used by this menu, whose items need no container.
IsItemItsOwnContainerOverrideReports that every item is shown as it is, without a container.
OnApplyTemplateTakes the template's button and drop-down.
OnPopupWindowClosedCalled when the panel closes; the base implementation clears IsOpen.
OnPopupWindowOpenCalled when the panel opens; the base implementation lines up the copy of the application button drawn over it, and sets IsOpen.
Fields
ButtonImagePropertyIdentifies the ButtonImage dependency property.
IsOpenPropertyIdentifies the IsOpen dependency property.

Constructors

BinaryRibbonBackstageApplicationMenu

public BinaryRibbonBackstageApplicationMenu() : base()

Creates an empty backstage menu. A click on any menu item inside it closes it.

Properties

ButtonImage

public ImageSource ButtonImage

Gets or sets the picture on the application button.

Value
The default is the current skin's application button picture.
Remarks

While BinaryRibbonBuiltInSkinController.Skin is RibbonSkin.Windows7, a picture assigned here is replaced by the built-in Windows 7 one.

IsOpen

public bool IsOpen

Gets or sets whether the backstage panel is open.

Value
The default is false.
Remarks

Opening or closing it also closes the commands of a tabs-only ribbon if they are dropped down (BinaryRibbonBarPanel.CollapseRibbonBarCommand).

Methods

GetContainerForItemOverride

protected override System.Windows.DependencyObject GetContainerForItemOverride()

Creates a BinaryRibbonMenuItem; not used by this menu, whose items need no container.

Returns

IsItemItsOwnContainerOverride

protected override bool IsItemItsOwnContainerOverride(object item)

Reports that every item is shown as it is, without a container.

Parameters
item
The item.
Returns

Always true.

OnApplyTemplate

public override void OnApplyTemplate()

Takes the template's button and drop-down.

OnPopupWindowClosed

protected virtual void OnPopupWindowClosed(object sender, EventArgs e)

Called when the panel closes; the base implementation clears IsOpen.

Parameters
sender
The drop-down.
e
Not used.

OnPopupWindowOpen

protected virtual void OnPopupWindowOpen(object sender, EventArgs e)

Called when the panel opens; the base implementation lines up the copy of the application button drawn over it, and sets IsOpen.

Parameters
sender
The drop-down.
e
Not used.

Fields

ButtonImageProperty static

public static readonly DependencyProperty ButtonImageProperty

Identifies the ButtonImage dependency property.

IsOpenProperty static

public static readonly DependencyProperty IsOpenProperty

Identifies the IsOpen dependency property.