<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:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
xmlns:local="clr-namespace:TestProject"
Width="800"
Height="600"
Icon="pack://application:,,,/Image/applicationIcon-16x16.png"
dxc:ThemeManager.ThemeName="Azure"
Title="리본 컨트롤 생성하기"
FontFamily="나눔고딕코딩"
FontSize="16">
<dxb:BarManager Name="barManager">
<dxb:BarManager.Items>
<dxb:BarButtonItem x:Name="newBarButtonItem"
Glyph="pack://application:,,,/Image/new-16x16.png"
LargeGlyph="pack://application:,,,/Image/new-32x32.png"
Content="New"
Description="New blank document."
Hint="New blank document." />
<dxb:BarButtonItem x:Name="openBarButtonItem"
Glyph="pack://application:,,,/Image/open-16x16.png"
LargeGlyph="pack://application:,,,/Image/open-32x32.png"
Content="Open"
Description="Open a file."
Hint="Open a file." />
<dxb:BarButtonItem x:Name="closeBarButtonItem"
Glyph="pack://application:,,,/Image/close-16x16.png"
LargeGlyph="pack://application:,,,/Image/close-32x32.png"
Hint="Close the current document"
Content="Close" />
<dxb:BarButtonItem x:Name="printBarButtonItem"
Glyph="pack://application:,,,/Image/print-16x16.png"
LargeGlyph="pack://application:,,,/Image/print-32x32.png"
Content="Print"
Description="Prints the document."
Hint="Prints the document." />
<dxb:BarButtonItem x:Name="saveBarButtonItem"
Glyph="pack://application:,,,/Image/save-16x16.png"
LargeGlyph="pack://application:,,,/Image/save-32x32.png"
Content="Save"
Description="Saves the document."
Hint="Saves the document." />
<dxb:BarButtonItem x:Name="saveAsBarButtonItem"
Glyph="pack://application:,,,/Image/save-as-16x16.png"
LargeGlyph="pack://application:,,,/Image/save-as-32x32.png"
Content="Save As..."
Description="Save Document As..."
Hint="Save Document As..." />
<dxb:BarSplitButtonItem x:Name="saveBarSplitButtonItem"
Glyph="pack://application:,,,/Image/save-16x16.png"
LargeGlyph="pack://application:,,,/Image/save-32x32.png"
Content="Save">
<dxb:BarSplitButtonItem.PopupControl >
<dxb:PopupMenuInfo>
<dxb:PopupMenuInfo.ItemLinks>
<dxb:BarItemLink BarItemName="saveBarButtonItem" />
<dxb:BarItemLink BarItemName="saveAsBarButtonItem" />
</dxb:PopupMenuInfo.ItemLinks>
</dxb:PopupMenuInfo>
</dxb:BarSplitButtonItem.PopupControl>
</dxb:BarSplitButtonItem>
<dxb:BarButtonItem x:Name="cutBarButtonItem"
Glyph="pack://application:,,,/Image/cut-16x16.png"
Content="Cut" />
<dxb:BarButtonItem x:Name="copyBarButtonItem"
Glyph="pack://application:,,,/Image/copy-16x16.png"
Content="Copy" />
<dxb:BarButtonItem x:Name="pasteBarButtonItem"
Glyph="pack://application:,,,/Image/paste-16x16.png"
LargeGlyph="pack://application:,,,/Image/paste-32x32.png"
Content="Paste" />
<dxb:BarButtonItem x:Name="clearBarButtonItem"
Glyph="pack://application:,,,/Image/delete-16x16.png"
Content="Clear" />
<dxb:BarCheckItem x:Name="boldBarCheckItem"
Glyph="pack://application:,,,/Image/bold-16x16.png"
Content="Bold" />
<dxb:BarCheckItem x:Name="italicBarCheckItem"
Glyph="pack://application:,,,/Image/italic-16x16.png"
Content="Italic" />
<dxb:BarCheckItem Name="underlineBarCheckItem"
Glyph="pack://application:,,,/Image/underline-16x16.png"
Content="Underline" />
<dxb:BarButtonItem x:Name="aboutBarButtonItem"
Glyph="pack://application:,,,/Image/info-16x16.png"
LargeGlyph="pack://application:,,,/Image/info-32x32.png"
Content="About"
ItemClick="aboutBarButtonItem_ItemClick" />
<dxr:BarButtonGroup Name="fontShapeBarButtonGroup">
<dxr:BarButtonGroup.ItemLinks>
<dxb:BarItemLink BarItemName="boldBarCheckItem" />
<dxb:BarItemLink BarItemName="italicBarCheckItem" />
<dxb:BarItemLink BarItemName="underlineBarCheckItem" />
</dxr:BarButtonGroup.ItemLinks>
</dxr:BarButtonGroup>
<dxb:BarEditItem x:Name="fontSizeBarEditItem"
EditWidth="60"
Content="Font Size : "
EditValueChanged="fontSizeBarEditItem_EditValueChanged">
<dxb:BarEditItem.EditSettings>
<dxe:ComboBoxEditSettings
IsTextEditable="False"
PopupMaxHeight="250" />
</dxb:BarEditItem.EditSettings>
</dxb:BarEditItem>
<dxr:RibbonGalleryBarItem x:Name="fontRibbonGalleryBarItem">
<dxr:RibbonGalleryBarItem.Links>
<dxb:BarItemLink BarItemName="fontSizeBarEditItem" />
</dxr:RibbonGalleryBarItem.Links>
<dxr:RibbonGalleryBarItem.Gallery>
<dxb:Gallery x:Name="fontFamilyGallery"
MinColCount="1"
ColCount="5"
ItemCheckMode="Single"
IsGroupCaptionVisible="False"
IsItemCaptionVisible="False"
IsItemDescriptionVisible="False"
ItemChecked="fontFamilyGallery_ItemChecked"
ItemCaptionVerticalAlignment="Center">
<dxb:Gallery.Groups>
<dxb:GalleryItemGroup x:Name="fontFamilyGalleryItemGroup" />
</dxb:Gallery.Groups>
</dxb:Gallery>
</dxr:RibbonGalleryBarItem.Gallery>
<dxr:RibbonGalleryBarItem.DropDownGallery>
<dxb:Gallery
MinColCount="1"
ColCount="1"
RowCount="10"
ItemCheckMode="Single"
IsGroupCaptionVisible="False"
IsItemGlyphVisible="True"
IsItemDescriptionVisible="False"
ItemContentHorizontalAlignment="Stretch"
ItemContentVerticalAlignment="Center"
ItemChecked="fontFamilyGallery_ItemChecked"
SizeMode="Vertical">
<dxb:Gallery.Groups>
<dxb:GalleryItemGroup Name="fontFamilyDropDownGalleryItemGroup" />
</dxb:Gallery.Groups>
</dxb:Gallery>
</dxr:RibbonGalleryBarItem.DropDownGallery>
</dxr:RibbonGalleryBarItem>
<dxb:BarEditItem x:Name="ribbonStyleBarEditItem"
Content="Ribbon Style :"
EditWidth="100"
ClosePopupOnChangingEditValue="True"
EditValue="{Binding ElementName=ribbonControl, Path=RibbonStyle}">
<dxb:BarEditItem.EditSettings>
<dxe:ComboBoxEditSettings
IsTextEditable="False"
PopupMaxHeight="250">
<dxe:ComboBoxEditSettings.Items>
<dxr:RibbonStyle>Office2010</dxr:RibbonStyle>
<dxr:RibbonStyle>Office2007</dxr:RibbonStyle>
</dxe:ComboBoxEditSettings.Items>
</dxe:ComboBoxEditSettings>
</dxb:BarEditItem.EditSettings>
</dxb:BarEditItem>
<dxb:BarStaticItem x:Name="positionBarStaticItem"
ItemMinWidth="150" />
<dxb:BarStaticItem x:Name="fileNameBarStaticItem"
ItemMinWidth="150"
AutoSizeMode="Fill"
Content="Binding" />
</dxb:BarManager.Items>
<DockPanel>
<dxr:RibbonControl x:Name="ribbonControl"
DockPanel.Dock="Top"
ApplicationButtonLargeIcon="pack://application:,,,/Image/ribbon-application-32x32.png"
ApplicationButtonText="File"
PageCategoryAlignment="Right">
<dxr:RibbonControl.ApplicationMenu>
<dxr:ApplicationMenu
ShowRightPane="True"
RightPaneWidth="280">
<dxr:ApplicationMenu.ItemLinks>
<dxb:BarItemLink BarItemName="newBarButtonItem" />
<dxb:BarItemLink BarItemName="openBarButtonItem" />
<dxb:BarItemLinkSeparator/>
<dxb:BarItemLink BarItemName="saveBarSplitButtonItem" />
<dxb:BarItemLink BarItemName="printBarButtonItem" />
<dxb:BarItemLinkSeparator/>
<dxb:BarItemLink BarItemName="aboutBarButtonItem" />
</dxr:ApplicationMenu.ItemLinks>
<dxr:ApplicationMenu.RightPane>
<Border
BorderThickness="1 0 0 0"
BorderBrush="LightGray"
Background="White">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border
Margin="7 5 5 0"
BorderThickness="0 0 0 1"
BorderBrush="LightGray">
<Label FontWeight="Bold">Recent Documents :</Label>
</Border>
<ListBox Grid.Row="1"
Margin="2 0 0 0"
BorderThickness="0">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel
Margin="0 2 0 0"
Orientation="Horizontal">
<Border
BorderThickness="0 0 0 1"
BorderBrush="Black">
<TextBlock Text="{Binding Number}" />
</Border>
<TextBlock
Margin="7 0 0 0"
Text="{Binding FileName}" />
</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
Margin="0 0 10 0"
Width="100"
Content="Options"
Click="optionButton_Click" />
<Button
Width="100"
Content="Exit"
Click="exitButton_Click" />
</StackPanel>
</dxr:ApplicationMenu.BottomPane>
</dxr:ApplicationMenu>
</dxr:RibbonControl.ApplicationMenu>
<dxr:RibbonControl.PageHeaderItemLinks>
<dxb:BarItemLink BarItemName="ribbonStyleBarEditItem"/>
</dxr:RibbonControl.PageHeaderItemLinks>
<dxr:RibbonControl.ToolbarItemLinks>
<dxb:BarItemLink BarItemName="openBarButtonItem" />
<dxb:BarItemLink BarItemName="saveBarButtonItem" />
</dxr:RibbonControl.ToolbarItemLinks>
<dxr:RibbonDefaultPageCategory>
<dxr:RibbonPage Caption="Home">
<dxr:RibbonPageGroup x:Name="fileRibbonPageGroup"
Caption="File"
CaptionButtonClick="fileRibbonPageGroup_CaptionButtonClick">
<dxb:BarItemLink
BarItemName="newBarButtonItem"
RibbonStyle="Large" />
<dxb:BarItemLink
BarItemName="openBarButtonItem"
RibbonStyle="SmallWithText" />
<dxb:BarItemLink
BarItemName="closeBarButtonItem"
RibbonStyle="SmallWithText" />
<dxb:BarItemLink
BarItemName="printBarButtonItem"
RibbonStyle="SmallWithText" />
<dxb:BarItemLinkSeparator />
<dxb:BarItemLink
BarItemName="saveBarSplitButtonItem"
RibbonStyle="Large" />
</dxr:RibbonPageGroup>
<dxr:RibbonPageGroup x:Name="editRibbonPageGroup"
Caption="Edit"
CaptionButtonClick="editRibbonPageGroup_CaptionButtonClick">
<dxb:BarItemLink
BarItemName="pasteBarButtonItem"
RibbonStyle="Large" />
<dxb:BarItemLink
BarItemName="cutBarButtonItem"
RibbonStyle="SmallWithText" />
<dxb:BarItemLink
BarItemName="copyBarButtonItem"
RibbonStyle="SmallWithText" />
<dxb:BarItemLink
BarItemName="clearBarButtonItem"
RibbonStyle="SmallWithText" />
</dxr:RibbonPageGroup>
<dxr:RibbonPageGroup x:Name="formatRibbonPageGroup"
ShowCaptionButton="False"
Caption="Format">
<dxb:BarItemLink
BarItemName="fontShapeBarButtonGroup"
RibbonStyle="SmallWithoutText" />
</dxr:RibbonPageGroup>
</dxr:RibbonPage>
</dxr:RibbonDefaultPageCategory>
<dxr:RibbonPageCategory x:Name="selectionRibbonPageCategory"
IsVisible="False"
Color="Yellow"
Caption="Selection">
<dxr:RibbonPage Caption="Gallery Page">
<dxr:RibbonPageGroup
ShowCaptionButton="False"
Caption="Font">
<dxb:BarItemLink BarItemName="fontRibbonGalleryBarItem" />
<dxb:BarItemLink
BarItemName="fontSizeBarEditItem"
RibbonStyle="SmallWithoutText" />
</dxr:RibbonPageGroup>
</dxr:RibbonPage>
</dxr:RibbonPageCategory>
</dxr:RibbonControl>
<dxr:RibbonStatusBarControl x:Name="ribbonStatusBarControl"
DockPanel.Dock="Bottom"
IsSizeGripVisible="True">
<dxr:RibbonStatusBarControl.RightItemLinks>
<dxb:BarItemLink BarItemName="fileNameBarStaticItem" />
</dxr:RibbonStatusBarControl.RightItemLinks>
<dxr:RibbonStatusBarControl.LeftItemLinks>
<dxb:BarItemLink BarItemName="positionBarStaticItem" />
</dxr:RibbonStatusBarControl.LeftItemLinks>
</dxr:RibbonStatusBarControl>
<RichTextBox x:Name="richTextBox"
DockPanel.Dock="Top"
BorderThickness="0"
SelectionChanged="richTextBox_SelectionChanged"/>
</DockPanel>
</dxb:BarManager>
</dxr:DXRibbonWindow>