■ RibbonControl 클래스에서 윈도우를 통합하는 방법을 보여준다.
▶ MainWindow.xaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
<dxr:DXRibbonWindow x:Class="TestProject.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 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.v16.1" dxc:ThemeManager.ThemeName="Azure" Width="800" Height="600" Title="RibbonControl 클래스 : 윈도우 통합하기" FontFamily="나눔고딕코딩" FontSize="16"> <dxb:BarManager Name="barManager"> <dxb:BarManager.Items> <dxb:BarButtonItem Name="newItem" Glyph="pack://application:,,,/Images/new-16x16.png" LargeGlyph="pack://application:,,,/Images/new-32x32.png" Content="New" /> <dxb:BarButtonItem Name="openItem" Glyph="pack://application:,,,/Images/open-16x16.png" LargeGlyph="pack://application:,,,/Images/open-32x32.png" Content="Open" /> <dxb:BarButtonItem Name="closeItem" Glyph="pack://application:,,,/Images/close-16x16.png" LargeGlyph="pack://application:,,,/Images/close-32x32.png" Content="Close" /> <dxb:BarButtonItem Name="printItem" Glyph="pack://application:,,,/Images\print-16x16.png" LargeGlyph="pack://application:,,,/Images/print-32x32.png" Content="Print" /> <dxb:BarButtonItem Name="saveItem" Glyph="pack://application:,,,/Images/save-16x16.png" LargeGlyph="pack://application:,,,/Images/save-32x32.png" Content="Save" /> <dxb:BarButtonItem Name="saveAsItem" Glyph="pack://application:,,,/Images/save-as-16x16.png" Content="Save As..." /> </dxb:BarManager.Items> <DockPanel> <dxr:RibbonControl Name="ribbonControl" DockPanel.Dock="Top"> <dxr:RibbonControl.ApplicationMenu> <dxr:ApplicationMenu RightPaneWidth="200"> <dxr:ApplicationMenu.ItemLinks> <dxb:BarItemLink BarItemName="newItem" /> <dxb:BarItemLink BarItemName="openItem" /> <dxb:BarItemLinkSeparator /> <dxb:BarItemLink BarItemName="saveItem" /> <dxb:BarItemLink BarItemName="saveAsItem" /> </dxr:ApplicationMenu.ItemLinks> </dxr:ApplicationMenu> </dxr:RibbonControl.ApplicationMenu> <dxr:RibbonControl.ToolbarItemLinks> <dxb:BarItemLink BarItemName="openItem" /> <dxb:BarItemLink BarItemName="saveItem" /> </dxr:RibbonControl.ToolbarItemLinks> <dxr:RibbonDefaultPageCategory> <dxr:RibbonPage Caption="Home"> <dxr:RibbonPageGroup Name="fileGroup" Caption="File"> <dxb:BarItemLink BarItemName="openItem" RibbonStyle="SmallWithText" /> <dxb:BarItemLink BarItemName="closeItem" RibbonStyle="SmallWithText" /> <dxb:BarItemLink BarItemName="printItem" RibbonStyle="SmallWithText" /> <dxb:BarItemLinkSeparator /> <dxb:BarItemLink BarItemName="saveItem" RibbonStyle="Large" /> </dxr:RibbonPageGroup> </dxr:RibbonPage> </dxr:RibbonDefaultPageCategory> </dxr:RibbonControl> <RichTextBox DockPanel.Dock="Bottom" /> </DockPanel> </dxb:BarManager> </dxr:DXRibbonWindow> |