Back to Devexpress

ApplicationMenu.RightPane Property

wpf-devexpress-dot-xpf-dot-ribbon-dot-applicationmenu-3be1a253.md

latest5.9 KB
Original Source

ApplicationMenu.RightPane Property

Gets or sets the control displayed within the ApplicationMenu’s right pane. This is a dependency property.

Namespace : DevExpress.Xpf.Ribbon

Assembly : DevExpress.Xpf.Ribbon.v25.2.dll

NuGet Package : DevExpress.Wpf.Ribbon

Declaration

csharp
public FrameworkElement RightPane { get; set; }
vb
Public Property RightPane As FrameworkElement

Property Value

TypeDescription
FrameworkElement

The control displayed within the ApplicationMenu’s right pane.

|

Remarks

You can display any control within the ApplicationMenu’s right pane. Use the RightPane property to specify the control. To make the right pane visible, set the ApplicationMenu.ShowRightPane property to true. The right pane’s width is specified by the ApplicationMenu.RightPaneWidth property.

To display controls along the ApplicationMenu’s bottom edge, use the ApplicationMenu.BottomPane property.

Example

In this example, an ApplicationMenu displays specific commands in the left pane. The right and bottom panes are assigned to the menu with the RightPane and BottomPane properties.

View Example

xaml
<dxr:RibbonControl.ApplicationMenu>
    <dxr:ApplicationMenu RightPaneWidth="280" ShowRightPane="True">
        <dxr:ApplicationMenu.ItemLinks>
            <dxb:BarButtonItemLink BarItemName="bNew"/>
            <dxb:BarButtonItemLink BarItemName="bOpen"/>
            <dxb:BarItemLinkSeparator/>
            <dxb:BarSplitButtonItemLink BarItemName="sbSave"/>
            <dxb:BarButtonItemLink BarItemName="bPrint"/>

            <dxb:BarItemLinkSeparator/>
            <dxb:BarButtonItemLink BarItemName="bAbout"/>
        </dxr:ApplicationMenu.ItemLinks>
        <dxr:ApplicationMenu.RightPane>
            <Border Background="White" BorderThickness="1,0,0,0" BorderBrush="LightGray">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Border BorderThickness="0,0,0,1" BorderBrush="LightGray" Margin="7,5,5,0">
                        <Label FontWeight="Bold">Recent Documents:</Label>
                    </Border>
                    <ListBox Grid.Row="1" BorderThickness="0" Margin="2,0,0,0" >
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Margin="0,2,0,0">
                                    <Border BorderThickness="0,0,0,1" BorderBrush="Black">
                                        <TextBlock Text="{Binding Number}"/>
                                    </Border>
                                    <TextBlock Text="{Binding FileName}" Margin="7,0,0,0"/>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                        <ListBox.Items>
                            <local:RecentItem Number="1" FileName="Document4.rtf"/>
                            <local:RecentItem Number="2" FileName="Document3.rtf"/>
                            <local:RecentItem Number="3" FileName="Document2.rtf"/>
                            <local:RecentItem Number="4" FileName="Document1.rtf"/>
                        </ListBox.Items>
                    </ListBox>
                </Grid>
            </Border>
        </dxr:ApplicationMenu.RightPane>
        <dxr:ApplicationMenu.BottomPane>
            <StackPanel Orientation="Horizontal">
                <Button Click="OptionsButton_Click" Content="Options" Width="100" Margin="0,0,10,0" />

                <Button Click="ExitButton_Click" Content="Exit" Width="100" />

            </StackPanel>
        </dxr:ApplicationMenu.BottomPane>
    </dxr:ApplicationMenu>
</dxr:RibbonControl.ApplicationMenu>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RightPane property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-create-a-ribboncontrol/CS/RibbonControl_Ex/MainWindow.xaml#L41

xml
</dxr:ApplicationMenu.ItemLinks>
<dxr:ApplicationMenu.RightPane>
    <Border Background="White" BorderThickness="1,0,0,0" BorderBrush="LightGray">

See Also

BottomPane

RightPaneWidth

ShowRightPane

ApplicationMenu Class

ApplicationMenu Members

DevExpress.Xpf.Ribbon Namespace