DXRibbonWindow Class

A window that is designed to be used together with a RibbonControl, to implement the Ribbon UI in your application.

Namespace: DevExpress.Xpf.Ribbon

Assembly: DevExpress.Xpf.Ribbon.v20.1.dll

Declaration

public class DXRibbonWindow :
    DXWindow,
    IRibbonWindow
Public Class DXRibbonWindow
    Inherits DXWindow
    Implements IRibbonWindow

Remarks

TIP

This class is outdated. Use the ThemedWindow.WindowKind property to integrate the RibbonControl with a window.

A RibbonControl, when positioned at the top of the DXRibbonWindow, is consistently integrated into the window.

The following image shows a DXRibbonWindow displaying a RibbonControl, painted in Office2007 style:

DXRibbonWindow

When the RibbonControl.RibbonStyle property is set to Office2010, the DXRibbonWindow displays an application icon at the top left corner. You can change this icon via the inherited Icon property:

DXRibbonWindow_ApplicationIcon

NOTE

The DXRibbonWindow is not designed to be used without a RibbonControl.

For more information on the DXRibbonWindow, see DXRibbonWindow.

Examples

This example shows how to create a DXRibbonWindow and add a RibbonControl to the window.

<dxr:DXRibbonWindow x:Class="DXRibbonWindow_Ex.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525"
        xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
        xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
        xmlns:dxr="clr-namespace:DevExpress.Xpf.Ribbon;assembly=DevExpress.Xpf.Ribbon.v12.1"
        dxc:ThemeManager.ThemeName="Azure"
        >
    <dxb:BarManager Name="barManager1">
        <dxb:BarManager.Items>
            <dxb:BarButtonItem Name="bNew" Content="New" Glyph="pack://application:,,,/Images/new-16x16.png" LargeGlyph="pack://application:,,,/Images/new-32x32.png" />
            <dxb:BarButtonItem Name="bOpen" Content="Open" Glyph="pack://application:,,,/Images/open-16x16.png" LargeGlyph="pack://application:,,,/Images/open-32x32.png" />
            <dxb:BarButtonItem Name="bClose" Content="Close" Glyph="pack://application:,,,/Images/close-16x16.png" LargeGlyph="pack://application:,,,/Images/close-32x32.png" />
            <dxb:BarButtonItem Name="bPrint" Content="Print" Glyph="pack://application:,,,/Images\print-16x16.png" LargeGlyph="pack://application:,,,/Images/print-32x32.png" />
            <dxb:BarButtonItem Name="bSave" Content="Save" Glyph="pack://application:,,,/Images/save-16x16.png" LargeGlyph="pack://application:,,,/Images/save-32x32.png" />
            <dxb:BarButtonItem Name="bSaveAs" Content="Save As..." Glyph="pack://application:,,,/Images/save-as-16x16.png" />
        </dxb:BarManager.Items>
        <DockPanel>
            <dxr:RibbonControl x:Name="ribbonControl1" DockPanel.Dock="Top">
                <dxr:RibbonControl.ApplicationMenu>
                    <dxr:ApplicationMenu RightPaneWidth="200">
                        <dxr:ApplicationMenu.ItemLinks>
                            <dxb:BarItemLink BarItemName="bNew" />
                            <dxb:BarItemLink BarItemName="bOpen" />
                            <dxb:BarItemLinkSeparator />
                            <dxb:BarItemLink BarItemName="bSave" />
                            <dxb:BarItemLink BarItemName="bSaveAs" />
                        </dxr:ApplicationMenu.ItemLinks>
                    </dxr:ApplicationMenu>
                </dxr:RibbonControl.ApplicationMenu>

                <dxr:RibbonControl.ToolbarItemLinks>
                    <dxb:BarItemLink BarItemName="bOpen" />
                    <dxb:BarItemLink BarItemName="bSave" />
                </dxr:RibbonControl.ToolbarItemLinks>

                <dxr:RibbonDefaultPageCategory>
                    <dxr:RibbonPage Caption="Home">
                        <dxr:RibbonPageGroup Name="pFile" Caption="File">
                            <dxb:BarItemLink BarItemName="bOpen" RibbonStyle="SmallWithText" />
                            <dxb:BarItemLink BarItemName="bClose" RibbonStyle="SmallWithText" />
                            <dxb:BarItemLink BarItemName="bPrint" RibbonStyle="SmallWithText" />

                            <dxb:BarItemLinkSeparator />
                            <dxb:BarItemLink BarItemName="bSave" RibbonStyle="Large" />
                        </dxr:RibbonPageGroup>
                    </dxr:RibbonPage>
                </dxr:RibbonDefaultPageCategory>

            </dxr:RibbonControl>

            <RichTextBox DockPanel.Dock="Bottom" />
        </DockPanel>
    </dxb:BarManager>
</dxr:DXRibbonWindow>
See Also