<UserControl x:Class="Office2016InspiredApplication.RichTextBoxControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:appearance="clr-namespace:Office2016InspiredApplication.Appearance"
             xmlns:viewModel="clr-namespace:Office2016InspiredApplication.ViewModel"
             xmlns:telerikControlsRTBUI="clr-namespace:Telerik.Windows.Controls.RichTextBoxUI;assembly=Telerik.Windows.Controls.RichTextBoxUI"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">

    <UserControl.Resources>
        <viewModel:MainViewModel x:Key="MainViewModel" />

        <Style TargetType="telerikControlsRTBUI:RadRichTextBoxRibbonUI" BasedOn="{StaticResource RibbonViewOffice2016Style}"/>

        <ControlTemplate x:Key="DocumentPrintLayoutPresenterStyle" TargetType="telerik:DocumentPrintLayoutPresenter">
            <Grid>
                <ContentPresenter />
            </Grid>
        </ControlTemplate>

        <ControlTemplate x:Key="DocumentWebLayoutPresenterStyle" TargetType="telerik:DocumentWebLayoutPresenter">
            <Grid>
                <ContentPresenter />
            </Grid>
        </ControlTemplate>
    </UserControl.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <telerik:RadRichTextBoxRibbonUI ApplicationButtonContent="File" BackstageClippingElement="{Binding ElementName=radRichTextBox}" CollapseThresholdSize="50,50" 
                                        DataContext="{Binding Commands, ElementName=radRichTextBox}" >
            <telerik:RadRichTextBoxRibbonUI.Resources>
                <telerik:FontFamiliesProvider x:Key="FontFamiliesProvider"/>
                <telerik:EditingContextTypeToBoolConverter x:Key="EditingContextTypeToBoolConverter"/>
            </telerik:RadRichTextBoxRibbonUI.Resources>
            <telerik:RadRichTextBoxRibbonUI.Backstage>
                <telerik:RadRibbonBackstage Margin="-25 0 0 -25">
                    <telerik:RadRibbonBackstageItem Header="New" Icon="{telerik:IconResource IconRelativePath=16/new.png,IconSources={StaticResource RichTextBoxUIIconSources}}" IsSelectable="false" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding NewDocumentCommand}"/>
                    <telerik:RadRibbonBackstageItem Header="Open" Icon="{telerik:IconResource IconRelativePath=16/open.png,IconSources={StaticResource RichTextBoxUIIconSources}}" IsSelectable="false" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding OpenDocumentCommand}"/>
                    <telerik:RadRibbonBackstageItem Header="Save" Icon="{telerik:IconResource IconRelativePath=16/save.png,IconSources={StaticResource RichTextBoxUIIconSources}}" IsSelectable="false" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}"/>
                    <telerik:RadRibbonBackstageItem Header="Save As" Icon="{telerik:IconResource IconRelativePath=16/saveas.png,IconSources={StaticResource RichTextBoxUIIconSources}}" IsDefault="false">
                        <StackPanel HorizontalAlignment="Stretch" Margin="20,20,0,0" UseLayoutRounding="True">
                            <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" FontFamily="Verdana" Text="Save As"/>
                            <Rectangle Fill="Gray" HorizontalAlignment="Left" Height="1" Width="410"/>
                            <StackPanel Margin="0,30,0,0" Orientation="Horizontal">
                                <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="docx" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90">
                                    <Image HorizontalAlignment="Center" Source="{telerik:IconResource IconRelativePath=ApplicationMenu/worddoc.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                </telerik:RadRibbonButton>
                                <StackPanel Margin="20 0 0 0">
                                    <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="Word Document"/>
                                    <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Save the file as a Word document." Width="300"/>
                                </StackPanel>
                            </StackPanel>
                            <StackPanel Margin="0,30,0,0" Orientation="Horizontal">
                                <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="pdf" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90">
                                    <Image HorizontalAlignment="Center" Source="{telerik:IconResource IconRelativePath=ApplicationMenu/Pdf.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                </telerik:RadRibbonButton>
                                <StackPanel Margin="20 0 0 0">
                                    <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="PDF Document"/>
                                    <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Save document as a PDF file." Width="300"/>
                                </StackPanel>
                            </StackPanel>
                            <StackPanel Margin="0,30,0,0" Orientation="Horizontal">
                                <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="html" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90">
                                    <Image HorizontalAlignment="Center" Source="{telerik:IconResource IconRelativePath=ApplicationMenu/html.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                </telerik:RadRibbonButton>
                                <StackPanel Margin="20 0 0 0">
                                    <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="HTML Document"/>
                                    <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Save the file as a HTML document." Width="300"/>
                                </StackPanel>
                            </StackPanel>
                            <StackPanel Margin="0,30,0,0" Orientation="Horizontal">
                                <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="rtf" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90">
                                    <Image HorizontalAlignment="Center" Source="{telerik:IconResource IconRelativePath=ApplicationMenu/Rtf.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                </telerik:RadRibbonButton>
                                <StackPanel Margin="20 0 0 0">
                                    <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="Rich Text Format"/>
                                    <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Save document in Rich Text Format." Width="300"/>
                                </StackPanel>
                            </StackPanel>
                            <StackPanel Margin="0,30,0,0" Orientation="Horizontal">
                                <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="txt" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90">
                                    <Image HorizontalAlignment="Center" Source="{telerik:IconResource IconRelativePath=ApplicationMenu/PlainText.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                </telerik:RadRibbonButton>
                                <StackPanel Margin="20 0 0 0">
                                    <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="Plain text"/>
                                    <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Save document in plain text format." Width="300"/>
                                </StackPanel>
                            </StackPanel>
                            <StackPanel Margin="0,30,0,0" Orientation="Horizontal">
                                <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="xaml" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90">
                                    <Image HorizontalAlignment="Center" Source="{telerik:IconResource IconRelativePath=ApplicationMenu/Xaml.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                </telerik:RadRibbonButton>
                                <StackPanel Margin="20 0 0 0">
                                    <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="XAML Document"/>
                                    <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Save document as a XAML file." Width="300"/>
                                </StackPanel>
                            </StackPanel>
                        </StackPanel>
                    </telerik:RadRibbonBackstageItem>
                    <telerik:RadRibbonBackstageItem Header="Print" Icon="{telerik:IconResource IconRelativePath=16/print.png,IconSources={StaticResource RichTextBoxUIIconSources}}" IsDefault="true">
                        <StackPanel HorizontalAlignment="Stretch" Margin="20,20,0,0" UseLayoutRounding="True">
                            <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" FontFamily="Verdana" Text="Print"/>
                            <Rectangle Fill="Gray" HorizontalAlignment="Left" Height="1" Width="410"/>
                            <StackPanel Margin="0,30,0,0" Orientation="Horizontal">
                                <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="Native" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PrintCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="True" VerticalContentAlignment="Center" Width="90">
                                    <Image HorizontalAlignment="Center" Source="{telerik:IconResource IconRelativePath=ApplicationMenu/pagesetup.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                </telerik:RadRibbonButton>
                                <StackPanel Margin="20 0 0 0">
                                    <TextBlock Foreground="#FF5E5E7C" FontWeight="ExtraBold" FontSize="18" Text="Native Print"/>
                                    <TextBlock FontSize="13" FontFamily="Verdana" TextWrapping="Wrap" Text="Send the document directly to the default printer without making changes." Width="300"/>
                                </StackPanel>
                            </StackPanel>
                        </StackPanel>
                    </telerik:RadRibbonBackstageItem>
                </telerik:RadRibbonBackstage>
            </telerik:RadRichTextBoxRibbonUI.Backstage>
            <telerik:RadRichTextBoxRibbonUI.ContextualGroups>
                <telerik:RadRibbonContextualGroup x:Name="TableTools" Header="Table Tools">
                    <telerik:RadRibbonContextualGroup.IsActive>
                        <Binding Converter="{StaticResource EditingContextTypeToBoolConverter}" Mode="OneWay" Path="AssociatedRichTextBox.CurrentEditingContext.Type">
                            <Binding.ConverterParameter>
                                <telerik:EditingContextTypes>Table</telerik:EditingContextTypes>
                            </Binding.ConverterParameter>
                        </Binding>
                    </telerik:RadRibbonContextualGroup.IsActive>
                </telerik:RadRibbonContextualGroup>
                <telerik:RadRibbonContextualGroup x:Name="HeaderFooterTools" Header="Header &amp; Footer Tools">
                    <telerik:RadRibbonContextualGroup.IsActive>
                        <Binding Converter="{StaticResource EditingContextTypeToBoolConverter}" Mode="OneWay" Path="AssociatedRichTextBox.CurrentEditingContext.Type">
                            <Binding.ConverterParameter>
                                <telerik:EditingContextTypes>HeaderFooter</telerik:EditingContextTypes>
                            </Binding.ConverterParameter>
                        </Binding>
                    </telerik:RadRibbonContextualGroup.IsActive>
                </telerik:RadRibbonContextualGroup>
            </telerik:RadRichTextBoxRibbonUI.ContextualGroups>
            <telerik:RadRichTextBoxRibbonUI.QuickAccessToolBar>
                <telerik:QuickAccessToolBar Style="{StaticResource QuickAccessToolBarStyle}">
                    <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SaveCommand}" ContentTemplate="{StaticResource SaveDataTemplate}" Style="{StaticResource QATRibbonButtonStyle}" />
                    <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding UndoCommand}" ContentTemplate="{StaticResource UndoDataTemplate}" Style="{StaticResource QATRibbonButtonStyle}" />
                    <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding RedoCommand}" ContentTemplate="{StaticResource RedoDataTemplate}" Style="{StaticResource QATRibbonButtonStyle}" />
                </telerik:QuickAccessToolBar>
            </telerik:RadRichTextBoxRibbonUI.QuickAccessToolBar>
            <telerik:RadRibbonTab Header="Home">
                <telerik:RadRibbonGroup Header="Office2016 Color Variations"
                                        telerik:ScreenTip.Title="Office2016 Variations" DataContext="{StaticResource MainViewModel}">
                    <telerik:RadRibbonRadioButton IsChecked="True" Content="Colorful" Size="Large" Background="#FF2A579A" Style="{DynamicResource ColorVariationRadioButtonStyle}"
                                    Command="{Binding ChangeAppearanceCommand}">
                        <telerik:RadRibbonRadioButton.CommandParameter>
                            <appearance:AppearanceCommandParameter ColorVariation="Colorful" />
                        </telerik:RadRibbonRadioButton.CommandParameter>
                    </telerik:RadRibbonRadioButton>
                    <telerik:RadRibbonRadioButton Content="Dark Gray" Size="Large" Background="#FF444444" Style="{DynamicResource ColorVariationRadioButtonStyle}"
                                        Command="{Binding ChangeAppearanceCommand}">
                        <telerik:RadRibbonRadioButton.CommandParameter>
                            <appearance:AppearanceCommandParameter ColorVariation="Dark" />
                        </telerik:RadRibbonRadioButton.CommandParameter>
                    </telerik:RadRibbonRadioButton>
                    <telerik:RadRibbonRadioButton Content="White" Size="Large" Background="#FFFFFFFF" Style="{DynamicResource ColorVariationRadioButtonStyle}"
                                             Command="{Binding ChangeAppearanceCommand}">
                        <telerik:RadRibbonRadioButton.CommandParameter>
                            <appearance:AppearanceCommandParameter ColorVariation="White" />
                        </telerik:RadRibbonRadioButton.CommandParameter>
                    </telerik:RadRibbonRadioButton>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Clipboard">
                    <telerik:RadCollapsiblePanel>
                        <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Cut the selection and put it on the Clipboard." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding CutCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/cut.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Cut" telerik:ScreenTip.Title="Cut"/>
                        <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Copy the selection and put it on the Clipboard." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding CopyCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/copy.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Copy" telerik:ScreenTip.Title="Copy"/>
                        <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Paste the contents of the Clipboard." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PasteCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/paste.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Paste" telerik:ScreenTip.Title="Paste"/>
                    </telerik:RadCollapsiblePanel>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup DialogLauncherVisibility="Visible" telerik:ScreenTip.Description="Show the font dialog box." Header="Font" telerik:ScreenTip.Icon="{telerik:IconResource IconRelativePath=FontDialog.png, IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowFontPropertiesDialogCommand}" telerik:ScreenTip.Title="Font">
                    <telerik:RadOrderedWrapPanel>
                        <StackPanel Orientation="Horizontal">
                            <telerik:RadRibbonComboBox CanAutocompleteSelectItems="False" CanKeyboardNavigationSelectItems="False" CommandParameter="{Binding SelectedValue, RelativeSource={RelativeSource Self}}" telerik:ScreenTip.Description="Change the font family." IsReadOnly="True" ItemsSource="{Binding RegisteredFonts, Source={StaticResource FontFamiliesProvider}}" MaxDropDownHeight="400" OpenDropDownOnFocus="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeFontFamilyCommand}" telerik:ScreenTip.Title="Font" Width="132"/>
                            <telerik:RadRibbonComboBox CanAutocompleteSelectItems="False" CanKeyboardNavigationSelectItems="False" CommandParameter="{Binding SelectedItem.Tag, RelativeSource={RelativeSource Self}}" telerik:ScreenTip.Description="Change the font size." IsEditable="True" IsReadOnly="True" IsTextSearchEnabled="False" MaxDropDownHeight="400" OpenDropDownOnFocus="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeFontSizeCommand}" telerik:ScreenTip.Title="Font Size" Width="65">
                                <telerik:RadRibbonComboBoxItem Content="8" Tag="10.67"/>
                                <telerik:RadRibbonComboBoxItem Content="9" Tag="12"/>
                                <telerik:RadRibbonComboBoxItem Content="10" Tag="13.34"/>
                                <telerik:RadRibbonComboBoxItem Content="11" Tag="14.67"/>
                                <telerik:RadRibbonComboBoxItem Content="12" Tag="16"/>
                                <telerik:RadRibbonComboBoxItem Content="14" Tag="18.67"/>
                                <telerik:RadRibbonComboBoxItem Content="16" Tag="21.33"/>
                                <telerik:RadRibbonComboBoxItem Content="18" Tag="24"/>
                                <telerik:RadRibbonComboBoxItem Content="20" Tag="26.67"/>
                                <telerik:RadRibbonComboBoxItem Content="22" Tag="29.33"/>
                                <telerik:RadRibbonComboBoxItem Content="24" Tag="32"/>
                                <telerik:RadRibbonComboBoxItem Content="26" Tag="34.67"/>
                                <telerik:RadRibbonComboBoxItem Content="28" Tag="37.33"/>
                                <telerik:RadRibbonComboBoxItem Content="36" Tag="48"/>
                                <telerik:RadRibbonComboBoxItem Content="48" Tag="64"/>
                                <telerik:RadRibbonComboBoxItem Content="72" Tag="96"/>
                            </telerik:RadRibbonComboBox>
                        </StackPanel>
                        <telerik:RadButtonGroup>
                            <telerik:RadRibbonButton telerik:ScreenTip.Description="Increase the font size." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding IncrementFontSizeCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/font-increasesize.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Grow Font"/>
                            <telerik:RadRibbonButton telerik:ScreenTip.Description="Decrease the font size." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding DecrementFontSizeCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/font-decreasesize.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Shrink Font"/>
                        </telerik:RadButtonGroup>
                        <telerik:RadButtonGroup>
                            <telerik:RadRibbonButton telerik:ScreenTip.Description="Clear all the formatting from the selection, leaving only the plain text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ClearAllFormattingCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/ClearFormatting16.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Clear All Formatting"/>
                        </telerik:RadButtonGroup>
                        <telerik:RadButtonGroup>
                            <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Make the selected text bold." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleBoldCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/bold.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Bold"/>
                            <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Italicize the selected text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleItalicCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/italic.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Italic"/>
                            <telerik:RadRibbonSplitButton telerik:ScreenTip.Description="Underline the selected text." IsToggle="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleUnderlineCommand}" SmallImage="{telerik:IconResource IconRelativePath=16/underline.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Underline">
                                <telerik:RadRibbonSplitButton.DropDownContent>
                                    <telerik:RadGallery Height="210" ItemWidth="156" ItemHeight="26" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeUnderlineDecorationCommand}" ViewportWidth="157">
                                        <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=underline1.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="Line"/>
                                        <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=underline2.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="DoubleLine"/>
                                        <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=underline3.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="ThickLine"/>
                                        <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=underline4.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="DottedLine"/>
                                        <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=underline5.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="DashedLine"/>
                                        <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=underline6.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="DotDashedLine"/>
                                        <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=underline7.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="DotDotDashedLine"/>
                                        <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=underline8.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="Wave"/>
                                    </telerik:RadGallery>
                                </telerik:RadRibbonSplitButton.DropDownContent>
                            </telerik:RadRibbonSplitButton>
                            <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Draw a line through the middle of the selected text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleStrikethroughCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/Strikethrough16.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Strikethrough"/>
                            <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Create small letters below the text baseline." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleSubscriptCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/subscript.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Subscript"/>
                            <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Create small text above the line of text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleSuperscriptCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/superscript.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Superscript"/>
                        </telerik:RadButtonGroup>
                        <telerik:RadButtonGroup>
                            <telerik:FormattingColorPicker ActiveColor="Yellow" AutomaticColor="Transparent" BorderThickness="0" telerik:ScreenTip.Description="Make text look like it was marked with a highlighter pen." Image="{telerik:IconResource IconRelativePath=16/highlight.png,IconSources={StaticResource RichTextBoxUIIconSources}}" NoColorText="No color" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeFontHighlightColorCommand}" telerik:ScreenTip.Title="Text Highlight Color"/>
                            <telerik:FormattingColorPicker ActiveColor="Red" BorderThickness="0" telerik:ScreenTip.Description="Change the text color." Image="{telerik:IconResource IconRelativePath=16/FontForeColor.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeFontForeColorCommand}" telerik:ScreenTip.Title="Font Color"/>
                        </telerik:RadButtonGroup>
                    </telerik:RadOrderedWrapPanel>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup DialogLauncherVisibility="Visible" telerik:ScreenTip.Description="Show the Paragraph dialog box." Header="Paragraph" telerik:ScreenTip.Icon="{telerik:IconResource IconRelativePath=PropertiesDialog.png, IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowParagraphPropertiesDialogCommand}" telerik:ScreenTip.Title="Paragraph">
                    <telerik:RadOrderedWrapPanel>
                        <telerik:RadButtonGroup>
                            <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Start a bulleted list." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleBulletsCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/list-bullets.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Bullets"/>
                            <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Start a numbered list." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleNumberedCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/list-numbered.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Numbering"/>
                            <telerik:RadRibbonDropDownButton telerik:ScreenTip.Description="Start a multilevel list. Click the arrow to choose different multilevel list styles." Command="{Binding ChangeListStyleCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/MultilevelList.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Multilevel List">
                                <telerik:RadRibbonDropDownButton.DropDownContent>
                                    <StackPanel>
                                        <ScrollViewer MaxHeight="565">
                                            <StackPanel>
                                                <telerik:RadGroupHeader Content="List Library"/>
                                                <telerik:RadGallery Height="176" ItemWidth="88" ItemHeight="88" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeListStyleCommand}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ViewportWidth="266">
                                                    <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=MultilevelListNone.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="None"/>
                                                    <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=MultilevelListBulleted.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="Bulleted"/>
                                                    <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=MultilevelListNumbered.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="Numbered"/>
                                                    <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=MultilevelListNumberedParenthesis.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="NumberedParenthesis"/>
                                                    <telerik:RadGalleryItem Image="{telerik:IconResource IconRelativePath=MultilevelListNumberedHierarchical.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="NumberedHierarchical"/>
                                                </telerik:RadGallery>
                                                <telerik:ListStylesGallery AssociatedRichTextBox="{Binding AssociatedRichTextBox, Mode=OneWay}"/>
                                            </StackPanel>
                                        </ScrollViewer>
                                        <telerik:RadRibbonButton HorizontalAlignment="Stretch" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowDefineNewListStyleDialogCommand}" Size="Medium" Text="Define New List Style ..."/>
                                    </StackPanel>
                                </telerik:RadRibbonDropDownButton.DropDownContent>
                            </telerik:RadRibbonDropDownButton>
                        </telerik:RadButtonGroup>
                        <telerik:RadButtonGroup>
                            <telerik:RadRibbonButton telerik:ScreenTip.Description="Decrease the indent level of the paragraph." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding DecrementParagraphLeftIndentCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/outdent.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Decrease Indent"/>
                            <telerik:RadRibbonButton telerik:ScreenTip.Description="Increase the indent level of the paragraph." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding IncrementParagraphLeftIndentCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/indent.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Increase Indent"/>
                        </telerik:RadButtonGroup>
                        <telerik:RadButtonGroup>
                            <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Set the direction of text to be displayed from left to right." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeParagraphFlowDirectionCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/LeftToRightFlowDirection.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Left-to-Right Text Direction" telerik:ScreenTip.Title="Left-To-Right Text Direction">
                                <telerik:RadRibbonToggleButton.CommandParameter>
                                    <FlowDirection>LeftToRight</FlowDirection>
                                </telerik:RadRibbonToggleButton.CommandParameter>
                            </telerik:RadRibbonToggleButton>
                            <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Set the direction of text to be displayed from right to left." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeParagraphFlowDirectionCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/RightToLeftFlowDirection.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Right-to-Left Text Direction" telerik:ScreenTip.Title="Right-To-Left Text Direction">
                                <telerik:RadRibbonToggleButton.CommandParameter>
                                    <FlowDirection>RightToLeft</FlowDirection>
                                </telerik:RadRibbonToggleButton.CommandParameter>
                            </telerik:RadRibbonToggleButton>
                        </telerik:RadButtonGroup>
                        <telerik:RadButtonGroup>
                            <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Show paragraph marks and other hidden formatting symbols." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleFormattingSymbolsCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/formatting-symbols.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:ScreenTip.Title="Show/Hide Formatting Symbols"/>
                        </telerik:RadButtonGroup>
                        <telerik:RadButtonGroup>
                            <telerik:RadRibbonToggleButton CommandParameter="Left" telerik:ScreenTip.Description="Align text to the left." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTextAlignmentCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/alignleft.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Align Left" telerik:ScreenTip.Title="Align Text Left"/>
                            <telerik:RadRibbonToggleButton CommandParameter="Center" telerik:ScreenTip.Description="Center text." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTextAlignmentCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/aligncenter.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Center" telerik:ScreenTip.Title="Center"/>
                            <telerik:RadRibbonToggleButton CommandParameter="Right" telerik:ScreenTip.Description="Align text to the right." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTextAlignmentCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/alignright.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Align Right" telerik:ScreenTip.Title="Align Text Right"/>
                            <telerik:RadRibbonToggleButton CommandParameter="Justify" telerik:ScreenTip.Description="Align text to both left and right margins, adding extra space between words as necessary." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTextAlignmentCommand}" Size="Small" SmallImage="{telerik:IconResource IconRelativePath=16/alignjustify.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Justify" telerik:ScreenTip.Title="Justify"/>
                        </telerik:RadButtonGroup>
                        <telerik:RadButtonGroup>
                            <telerik:FormattingColorPicker ActiveColor="Transparent" AutomaticColor="Transparent" BorderThickness="0" telerik:ScreenTip.Description="Color the background behind the selected paragraph." Image="{telerik:IconResource IconRelativePath=16/ParagraphBackgroundColor.png,IconSources={StaticResource RichTextBoxUIIconSources}}" NoColorText="No color" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeParagraphBackgroundColorCommand}" telerik:ScreenTip.Title="Shading"/>
                        </telerik:RadButtonGroup>
                    </telerik:RadOrderedWrapPanel>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Editing &amp; Proofing">
                    <telerik:RadCollapsiblePanel>
                        <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Find or replace text in the document." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowFindReplaceDialogCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/Find.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Find/Replace" telerik:ScreenTip.Title="Find/Replace"/>
                        <telerik:RadRibbonToggleButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Enable/Disable spell checking." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleSpellCheckingCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/EnableSpellCheck.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Enable Spell Check" telerik:ScreenTip.Title="Spell Check"/>
                        <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:ScreenTip.Description="Open context menu on next spelling error." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding OpenContextMenuOnNextSpellingErrorCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/FindNextSpellingError.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Find Next Error" telerik:ScreenTip.Title="Next Error"/>
                    </telerik:RadCollapsiblePanel>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Styles">
                    <telerik:StylesGallery AssociatedRichTextBox="{Binding AssociatedRichTextBox, Mode=OneWay}"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Change the set of styles, colors, fonts and paragraph spacing used in this document." LargeImage="{telerik:IconResource IconRelativePath=32/ChangeStyles.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowManageStylesDialogCommand}" Size="Large" Text="Change Styles" telerik:ScreenTip.Title="Change Styles"/>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
            <telerik:RadRibbonTab Header="Insert">
                <telerik:RadRibbonGroup Header="Pages">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Start the next page at the current position." LargeImage="{telerik:IconResource IconRelativePath=32/PageBreak.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertPageBreakCommand}" Size="Large" Text="Page Break" telerik:ScreenTip.Title="Page Break"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Tables">
                    <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding InsertTableCommand}" telerik:ScreenTip.Description="Insert a table into the document." LargeImage="{telerik:IconResource IconRelativePath=32/InsertTable.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Size="Large" Text="Table" telerik:ScreenTip.Title="Table">
                        <telerik:RadRibbonDropDownButton.DropDownContent>
                            <StackPanel>
                                <telerik:RadRibbonButton ClickMode="Press">
                                    <telerik:TableSizePicker Command="{Binding InsertTableCommand}"/>
                                </telerik:RadRibbonButton>
                                <telerik:RadMenuItem IsSeparator="True"/>
                                <telerik:RadRibbonButton HorizontalAlignment="Stretch" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertTableDialogCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/InsertTable.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Insert Table..."/>
                            </StackPanel>
                        </telerik:RadRibbonDropDownButton.DropDownContent>
                    </telerik:RadRibbonDropDownButton>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Illustrations">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert a picture from a file." LargeImage="{telerik:IconResource IconRelativePath=32/Picture.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertPictureCommand}" Size="Large" Text="Picture" telerik:ScreenTip.Title="Insert Picture from File"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Links">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Create a link to a Web page, a picture or an e-mail address." LargeImage="{telerik:IconResource IconRelativePath=32/inserthyperlink.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertHyperlinkDialogCommand}" Size="Large" Text="Hyperlink" telerik:ScreenTip.Title="Insert Hyperlink"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Create a bookmark to assign a name to a specific point in a document." LargeImage="{telerik:IconResource IconRelativePath=32/InsertBookmark.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowManageBookmarksDialogCommand}" Size="Large" Text="Bookmark" telerik:ScreenTip.Title="Bookmark"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Refer to items such as headings, figures and tables." LargeImage="{telerik:IconResource IconRelativePath=32/InsertCrossReference.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertCrossReferenceWindowCommand}" Size="Large" Text="Cross-reference" telerik:ScreenTip.Title="Cross-reference"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Comments">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Add a comment about the selection." LargeImage="{telerik:IconResource IconRelativePath=32/NewComment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertCommentCommand}" Size="Large" Text="New Comment" telerik:ScreenTip.Title="Insert Comment"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Header &amp; Footer">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Edit the header of the document." LargeImage="{telerik:IconResource IconRelativePath=32/EditHeader.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding EditHeaderCommand}" Size="Large" Text="Header" telerik:ScreenTip.Title="Header"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Edit the footer of the document." LargeImage="{telerik:IconResource IconRelativePath=32/EditFooter.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding EditFooterCommand}" Size="Large" Text="Footer" telerik:ScreenTip.Title="Footer"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Text">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert the current date or time into the current document." LargeImage="{telerik:IconResource IconRelativePath=32/InsertDateTime.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertDateTimeDialogCommand}" Size="Large" Text="Date &amp; Time" telerik:ScreenTip.Title="Insert Date and Time"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert page numbers into the document." LargeImage="{telerik:IconResource IconRelativePath=32/InsertPageNumber.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertPageFieldCommand}" Size="Large" Text="Page Number" telerik:ScreenTip.Title="Insert Page Number"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert block containing formatted programming source code." LargeImage="{telerik:IconResource IconRelativePath=32/CodeBlock.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowCodeFormattingDialogCommand}" Size="Large" Text="Code" telerik:ScreenTip.Title="Insert Code Block"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Symbols">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert symbols that are not on your keyboard, such as copyright symbols, trademark symbols, paragraph marks, and Unicode characters." LargeImage="{telerik:IconResource IconRelativePath=32/Symbol.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertSymbolWindowCommand}" Size="Large" Text="Symbol" telerik:ScreenTip.Title="Insert Symbol"/>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
            <telerik:RadRibbonTab Header="Page Layout">
                <telerik:RadRibbonGroup Header="Page Setup">
                    <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding ChangePaperTypeCommand}" telerik:ScreenTip.Description="Choose a paper size for the current section." LargeImage="{telerik:IconResource IconRelativePath=32/PageSize.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Size="Large" Text="Size" telerik:ScreenTip.Title="Page Size">
                        <telerik:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadGallery ItemWidth="184" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangePaperTypeCommand}" ViewportWidth="185">
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="A0">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="A0" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (33.05&quot; x 46.78&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="A1">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="A1" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (23.39&quot; x 33.05&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="A2">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="A2" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (16.53&quot; x 23.39&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="A3">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="A3" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (11.7&quot; x 16.53&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="A4">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="A4" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (8.26&quot; x 11.7&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="A5">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="A5" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (5.83&quot; x 8.26&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="RA0">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="RA0" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (33.86&quot; x 48.03&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="RA1">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="RA1" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (24.01&quot; x 33.86&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="RA2">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="RA2" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (16.93&quot; x 24.01&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="RA3">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="RA3" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (12.01&quot; x 16.93&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="RA4">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="RA4" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (8.46&quot; x 12.01&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="RA5">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="RA5" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (4.76&quot; x 8.46&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="B0">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="B0" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (39.38&quot; x 55.67&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="B1">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="B1" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (27.83&quot; x 39.38&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="B2">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="B2" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (59.05&quot; x 19.68&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="B3">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="B3" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (13.91&quot; x 19.68&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="B4">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="B4" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (10.13&quot; x 14.33&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="B5">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="B5" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (7.17&quot; x 10.13&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Quarto">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Quarto" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (8&quot; x 10&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Foolscap">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Foolscap" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (8&quot; x 13&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Executive">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Executive" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (7.5&quot; x 10&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="GovernmentLetter">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="GovernmentLetter" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (10.5&quot; x 8&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Letter">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Letter" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (8.5&quot; x 11&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Legal">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Legal" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (8.5&quot; x 14&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Ledger">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Ledger" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (17&quot; x 11&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Tabloid">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Tabloid" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (11&quot; x 17&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Post">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Post" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (15.64&quot; x 19.25&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Crown">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Crown" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (20&quot; x 15&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="LargePost">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="LargePost" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (16.5&quot; x 21&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Demy">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Demy" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (17.5&quot; x 22&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Medium">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Medium" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (18&quot; x 23&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Royal">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Royal" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (20&quot; x 25&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Elephant">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Elephant" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (21.74&quot; x 28&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="DoubleDemy">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="DoubleDemy" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (23.5&quot; x 35&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="QuadDemy">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="QuadDemy" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (35&quot; x 45&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="STMT">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="STMT" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (5.5&quot; x 8.5&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Folio">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Folio" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (8.5&quot; x 13&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Statement">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Statement" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (5.5&quot; x 8.5&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Size10x14">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock FontWeight="Bold" Text="Size10x14" VerticalAlignment="Center"/>
                                        <TextBlock FontWeight="Normal" Text=" (10&quot; x 14&quot;)" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                            </telerik:RadGallery>
                        </telerik:RadRibbonDropDownButton.DropDownContent>
                    </telerik:RadRibbonDropDownButton>
                    <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding ChangePageMarginsCommand}" telerik:ScreenTip.Description="Select the margin sizes for the current section." LargeImage="{telerik:IconResource IconRelativePath=32/PageMargin.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Size="Large" Text="Margins" telerik:ScreenTip.Title="Margins">
                        <telerik:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadGallery Height="270" ItemWidth="114" ItemHeight="54" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangePageMarginsCommand}" ViewportWidth="115">
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Normal">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=PageMarginNormal.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Normal" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Narrow">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=PageMarginNarrow.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Narrow" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Moderate">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=PageMarginModerate.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Moderate" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Wide">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=PageMarginWide.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Wide" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Office2003">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=PageMarginNormal.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Office2003" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                            </telerik:RadGallery>
                        </telerik:RadRibbonDropDownButton.DropDownContent>
                    </telerik:RadRibbonDropDownButton>
                    <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding ChangePageOrientationCommand}" telerik:ScreenTip.Description="Switch the pages between portrait and landscape layouts." LargeImage="{telerik:IconResource IconRelativePath=32/PageOrientation.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Size="Large" Text="Orientation" telerik:ScreenTip.Title="Page Orientation">
                        <telerik:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadGallery Height="216" ItemWidth="109" ItemHeight="54" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangePageOrientationCommand}" ViewportWidth="110">
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left">
                                    <telerik:RadGalleryItem.Tag>
                                        <telerik:PageOrientation>Portrait</telerik:PageOrientation>
                                    </telerik:RadGalleryItem.Tag>
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=32/PageOrientationPortrait.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Portrait" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left">
                                    <telerik:RadGalleryItem.Tag>
                                        <telerik:PageOrientation>Rotate90</telerik:PageOrientation>
                                    </telerik:RadGalleryItem.Tag>
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=32/PageOrientationLandscape.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Landscape" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left">
                                    <telerik:RadGalleryItem.Tag>
                                        <telerik:PageOrientation>Rotate180</telerik:PageOrientation>
                                    </telerik:RadGalleryItem.Tag>
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=32/PageOrientationRotate180.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Rotate 180" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left">
                                    <telerik:RadGalleryItem.Tag>
                                        <telerik:PageOrientation>Rotate270</telerik:PageOrientation>
                                    </telerik:RadGalleryItem.Tag>
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=32/PageOrientationRotate270.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Rotate 270" VerticalAlignment="Center"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                            </telerik:RadGallery>
                        </telerik:RadRibbonDropDownButton.DropDownContent>
                    </telerik:RadRibbonDropDownButton>
                    <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding ChangeSectionColumnsCommand}"
                                                     telerik:ScreenTip.Description="Split your text on two or more columns." 
                                                     LargeImage="{telerik:IconResource IconRelativePath=SectionColumns/TwoLarge.png,IconSources={StaticResource RichTextBoxUIIconSources}}" 
                                                     Size="Large" Text="Columns" 
                                                     telerik:ScreenTip.Title="Add or Remove Columns">
                        <telerik:RadRibbonDropDownButton.DropDownContent>
                            <telerik:RadGallery Height="270" ItemWidth="150" ItemHeight="54" 
                                                telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeSectionColumnsCommand}" 
                                                ViewportWidth="150">
                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="One">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=SectionColumns/One.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Width="23" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="One" VerticalAlignment="Center" Margin="5 0"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>

                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Two">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=SectionColumns/Two.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Width="23" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Two" VerticalAlignment="Center" Margin="5 0"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>

                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Three">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=SectionColumns/Three.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Width="23" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Three" VerticalAlignment="Center" Margin="5 0"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>

                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Left">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=SectionColumns/Left.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Width="23" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Left" VerticalAlignment="Center" Margin="5 0"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>

                                <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Right">
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="{telerik:IconResource IconRelativePath=SectionColumns/Right.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Width="23" Stretch="None"/>
                                        <TextBlock FontWeight="Bold" Text="Right" VerticalAlignment="Center" Margin="5 0"/>
                                    </StackPanel>
                                </telerik:RadGalleryItem>
                            </telerik:RadGallery>

                        </telerik:RadRibbonDropDownButton.DropDownContent>
                    </telerik:RadRibbonDropDownButton>
                    <StackPanel>
                        <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding InsertSectionBreakCommand}" telerik:ScreenTip.Description="Add page, section, or column breaks to the document." LargeImage="{telerik:IconResource IconRelativePath=16/Break.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Size="Medium" Text="Breaks" telerik:ScreenTip.Title="Insert Page and Section Breaks">
                            <telerik:RadRibbonDropDownButton.DropDownContent>
                                <StackPanel>
                                    <telerik:RadGroupHeader Content="Page Breaks"/>
                                    <telerik:RadGallery Height="162" ItemHeight="54" ScrollViewer.VerticalScrollBarVisibility="Disabled" 
                                                        telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertBreakCommand}">
                                        <telerik:RadGalleryItem HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" Tag="PageBreak">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="{telerik:IconResource IconRelativePath=32/PageBreak.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                                <TextBlock FontWeight="Bold" Margin="8 0 0 0" Text="Page" VerticalAlignment="Center"/>
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                        <telerik:RadGalleryItem HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" Tag="ColumnBreak">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="{telerik:IconResource IconRelativePath=32/ColumnBreak.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                                <TextBlock FontWeight="Bold" Margin="8 0 0 0" Text="Column" VerticalAlignment="Center"/>
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                        <telerik:RadGalleryItem HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" Tag="LineBreak">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="{telerik:IconResource IconRelativePath=32/LineBreak.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                                <TextBlock FontWeight="Bold" Margin="8 0 0 0" Text="Text Wrapping" VerticalAlignment="Center"/>
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                    </telerik:RadGallery>
                                    <telerik:RadGroupHeader Content="Section Breaks"/>
                                    <telerik:RadGallery Height="162" ItemHeight="54" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertSectionBreakCommand}" ScrollViewer.VerticalScrollBarVisibility="Disabled">
                                        <telerik:RadGalleryItem HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" Tag="NextPage">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="{telerik:IconResource IconRelativePath=32/NextPageSectionBreak.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                                <TextBlock FontWeight="Bold" Margin="8 0 0 0" Text="Next Page" VerticalAlignment="Center"/>
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                        <telerik:RadGalleryItem HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" Tag="EvenPage">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="{telerik:IconResource IconRelativePath=32/EvenPageSectionBreak.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                                <TextBlock FontWeight="Bold" Margin="8 0 0 0" Text="Even Page" VerticalAlignment="Center"/>
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                        <telerik:RadGalleryItem HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" Tag="OddPage">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="{telerik:IconResource IconRelativePath=32/OddPageSectionBreak.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                                                <TextBlock FontWeight="Bold" Margin="8 0 0 0" Text="Odd Page" VerticalAlignment="Center"/>
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                    </telerik:RadGallery>
                                </StackPanel>
                            </telerik:RadRibbonDropDownButton.DropDownContent>
                        </telerik:RadRibbonDropDownButton>
                    </StackPanel>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Page Background">
                    <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding ChangeIntegratedWatermarkTypeCommand}" telerik:ScreenTip.Description="Insert ghosted text behind the content on the page." LargeImage="{telerik:IconResource IconRelativePath=32/Watermark.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Size="Large" Text="Watermark" telerik:ScreenTip.Title="Watermark">
                        <telerik:RadRibbonDropDownButton.DropDownContent>
                            <StackPanel Orientation="Vertical">
                                <telerik:RadGroupHeader Content="Predefined"/>
                                <telerik:RadGallery Height="200" ItemWidth="115" ItemHeight="100" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeIntegratedWatermarkTypeCommand}" ViewportWidth="345">
                                    <telerik:RadGalleryItem HorizontalContentAlignment="Left" Image="{telerik:IconResource IconRelativePath=WatermarkGallery/confidentialR.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="ConfidentialRotated"/>
                                    <telerik:RadGalleryItem HorizontalContentAlignment="Left" Image="{telerik:IconResource IconRelativePath=WatermarkGallery/confidential.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="Confidential"/>
                                    <telerik:RadGalleryItem HorizontalContentAlignment="Left" Image="{telerik:IconResource IconRelativePath=WatermarkGallery/doNotCopyR.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="DoNotCopyRotated"/>
                                    <telerik:RadGalleryItem HorizontalContentAlignment="Left" Image="{telerik:IconResource IconRelativePath=WatermarkGallery/doNotCopy.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="DoNotCopy"/>
                                    <telerik:RadGalleryItem HorizontalContentAlignment="Left" Image="{telerik:IconResource IconRelativePath=WatermarkGallery/draftR.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="DraftRotated"/>
                                    <telerik:RadGalleryItem HorizontalContentAlignment="Left" Image="{telerik:IconResource IconRelativePath=WatermarkGallery/draft.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="Draft"/>
                                    <telerik:RadGalleryItem HorizontalContentAlignment="Left" Image="{telerik:IconResource IconRelativePath=WatermarkGallery/sampleR.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="SampleRotated"/>
                                    <telerik:RadGalleryItem HorizontalContentAlignment="Left" Image="{telerik:IconResource IconRelativePath=WatermarkGallery/sample.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="Sample"/>
                                    <telerik:RadGalleryItem HorizontalContentAlignment="Left" Image="{telerik:IconResource IconRelativePath=WatermarkGallery/asapR.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="AsapRotated"/>
                                    <telerik:RadGalleryItem HorizontalContentAlignment="Left" Image="{telerik:IconResource IconRelativePath=WatermarkGallery/asap.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="Asap"/>
                                    <telerik:RadGalleryItem HorizontalContentAlignment="Left" Image="{telerik:IconResource IconRelativePath=WatermarkGallery/urgentR.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="UrgentRotated"/>
                                    <telerik:RadGalleryItem HorizontalContentAlignment="Left" Image="{telerik:IconResource IconRelativePath=WatermarkGallery/urgent.png, IconSources={StaticResource RichTextBoxUIIconSources}}" Tag="Urgent"/>
                                </telerik:RadGallery>
                                <telerik:RadMenuItem IsSeparator="True"/>
                                <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowWatermarkSettingsDialogCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/Watermark.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Insert custom watermark."/>
                                <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding RemoveWatermarkCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/RemoveWatermark.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Remove Watermark"/>
                            </StackPanel>
                        </telerik:RadRibbonDropDownButton.DropDownContent>
                    </telerik:RadRibbonDropDownButton>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
            <telerik:RadRibbonTab Header="References">
                <telerik:RadRibbonGroup Header="Table of Contents">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Add a Table of Contents to the document." LargeImage="{telerik:IconResource IconRelativePath=32/InsertTableOfContents.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertTableOfContentsDialogCommand}" Size="Large" Text="Table of Contents" telerik:ScreenTip.Title="Table of Contents"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup DialogLauncherVisibility="Visible" Header="Footnotes" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowNotesDialogCommand}">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Add a footnote to the document." LargeImage="{telerik:IconResource IconRelativePath=32/InsertFootnote.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertFootnoteCommand}" Size="Large" Text="Insert Footnote" telerik:ScreenTip.Title="Insert Footnote."/>
                    <telerik:RadCollapsiblePanel>
                        <telerik:RadRibbonButton telerik:ScreenTip.Description="Add an endnote to the document." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertEndnoteCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/InsertEndnote.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Insert Endnote" telerik:ScreenTip.Title="Insert Endnote."/>
                        <telerik:RadRibbonSplitButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding GoToNextFootnoteCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/NextNote.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Next Footnote">
                            <telerik:RadRibbonSplitButton.DropDownContent>
                                <StackPanel>
                                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Navigate to the next footnote in the document." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding GoToNextFootnoteCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/NextNote.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Next Footnote" telerik:ScreenTip.Title="Next Footnote."/>
                                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Navigate to the previous footnote in the document." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding GoToPreviousFootnoteCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/PreviousNote.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Previous Footnote" telerik:ScreenTip.Title="Previous Footnote."/>
                                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Navigate to the next endnote in the document." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding GoToNextEndnoteCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/NextNote.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Next Endnote" telerik:ScreenTip.Title="Next Endnote."/>
                                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Navigate to previous endnote in the document." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding GoToPreviousEndnoteCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/PreviousNote.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Previous Endnote" telerik:ScreenTip.Title="Previous Endnote."/>
                                </StackPanel>
                            </telerik:RadRibbonSplitButton.DropDownContent>
                        </telerik:RadRibbonSplitButton>
                    </telerik:RadCollapsiblePanel>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Citations &amp; Bibliography">
                    <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" telerik:ScreenTip.Description="Cite a book, journal article, or other periodical as the source for a pice of information in the document." LargeImage="{telerik:IconResource IconRelativePath=32/InsertCitation.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Size="Large" Text="Insert Citation" telerik:ScreenTip.Title="Insert Citation">
                        <telerik:RadRibbonDropDownButton.DropDownContent>
                            <StackPanel Orientation="Vertical">
                                <telerik:CitationsSourceGallery/>
                                <telerik:RadMenuItem IsSeparator="True"/>
                                <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowAddNewBibliographicReferenceDialogCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/AddNewSource.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Add New Source..."/>
                            </StackPanel>
                        </telerik:RadRibbonDropDownButton.DropDownContent>
                    </telerik:RadRibbonDropDownButton>
                    <telerik:RadCollapsiblePanel>
                        <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowManageBibliographicSourcesDialogCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/ManageSources.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Manage Sources"/>
                        <StackPanel Margin="3 0 0 0" Orientation="Horizontal">
                            <Image Margin="0 0 2 0" Source="{telerik:IconResource IconRelativePath=16/BibliographyStyle.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                            <TextBlock FontWeight="Normal" Margin="3 0" Text="Style:" VerticalAlignment="Center"/>
                            <telerik:RadRibbonComboBox CanAutocompleteSelectItems="False" CanKeyboardNavigationSelectItems="False" CommandParameter="{Binding SelectedValue, RelativeSource={RelativeSource Self}}" DisplayMemberPath="Name" IsReadOnly="True" ItemsSource="{Binding AssociatedRichTextBox.Document.BibliographicStyles.Values}" MinHeight="15" OpenDropDownOnFocus="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeBibliographicStyleCommand}" Width="80"/>
                        </StackPanel>
                        <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertBibliographyFieldCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/InsertBibliography.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Bibliography"/>
                    </telerik:RadCollapsiblePanel>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Captions">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Label your picture or object.&#xA;&#xA;Once you have added a caption, you can reference your object by inserting a cross-reference." LargeImage="{telerik:IconResource IconRelativePath=32/InsertCaption.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertCaptionDialogCommand}" Size="Large" Text="Insert Caption" telerik:ScreenTip.Title="Insert Caption"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Refer to items such as headings, figures and tables." LargeImage="{telerik:IconResource IconRelativePath=32/InsertCrossReference.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertCrossReferenceWindowCommand}" Size="Large" Text="Cross-reference" telerik:ScreenTip.Title="Cross-reference"/>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
            <telerik:RadRibbonTab Header="Mailings">
                <telerik:RadRibbonGroup Header="Write &amp; Insert Fields">
                    <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Highlight the fields you have inserted into the document." LargeImage="{telerik:IconResource IconRelativePath=32/HighlightMergeFields.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleMergeFieldsHighlightCommand}" Size="Large" Text="Highlight Merge Fields" telerik:ScreenTip.Title="Highlight Merge Fields"/>
                    <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" telerik:ScreenTip.Description="You can insert fields such as Name or Address, which will be replaced automatically with information from a database or contact list for each copy of the form letter." LargeImage="{telerik:IconResource IconRelativePath=32/InsertMergeField.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertMergeFieldEmptyCommand}" Size="Large" Text="Insert Merge Field" telerik:ScreenTip.Title="Insert Merge Field"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Preview Results">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Shows all fields codes in the current document." LargeImage="{telerik:IconResource IconRelativePath=32/ShowAllFieldsCodes.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeAllFieldsDisplayModeCommand}" Size="Large" Text="Show All Fields Codes" telerik:ScreenTip.Title="Show Fields Codes">
                        <telerik:RadRibbonButton.CommandParameter>
                            <telerik:FieldDisplayMode>Code</telerik:FieldDisplayMode>
                        </telerik:RadRibbonButton.CommandParameter>
                    </telerik:RadRibbonButton>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Show all fields names in the current document." LargeImage="{telerik:IconResource IconRelativePath=32/ShowAllFieldsDisplayNames.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeAllFieldsDisplayModeCommand}" Size="Large" Text="Show All Fields Names" telerik:ScreenTip.Title="Show Fields Names">
                        <telerik:RadRibbonButton.CommandParameter>
                            <telerik:FieldDisplayMode>DisplayName</telerik:FieldDisplayMode>
                        </telerik:RadRibbonButton.CommandParameter>
                    </telerik:RadRibbonButton>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Replace the merge fields in your document with actual data from your recipient list so you can see what it looks like." LargeImage="{telerik:IconResource IconRelativePath=32/ShowAllFieldsResults.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeAllFieldsDisplayModeCommand}" Size="Large" Text="Preview Results" telerik:ScreenTip.Title="View Merged Data">
                        <telerik:RadRibbonButton.CommandParameter>
                            <telerik:FieldDisplayMode>Result</telerik:FieldDisplayMode>
                        </telerik:RadRibbonButton.CommandParameter>
                    </telerik:RadRibbonButton>
                    <telerik:Separator/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Preview the first record in the recipient list." LargeImage="{telerik:IconResource IconRelativePath=32/First.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PreviewFirstMailMergeDataRecordCommand}" Size="Large" Text="First" telerik:ScreenTip.Title="Preview First Record"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Preview the previous record in the recipient list." LargeImage="{telerik:IconResource IconRelativePath=32/Previous.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PreviewPreviousMailMergeDataRecordCommand}" Size="Large" Text="Previous" telerik:ScreenTip.Title="Preview Previous Record"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Preview the next record in the recipient list." LargeImage="{telerik:IconResource IconRelativePath=32/Next.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PreviewNextMailMergeDataRecordCommand}" Size="Large" Text="Next" telerik:ScreenTip.Title="Preview Next Record"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Preview the last record in the recipient list." LargeImage="{telerik:IconResource IconRelativePath=32/Last.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding PreviewLastMailMergeDataRecordCommand}" Size="Large" Text="Last" telerik:ScreenTip.Title="Preview Last Record"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Finish">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Complete the mail merge." LargeImage="{telerik:IconResource IconRelativePath=32/MailMerge.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding MailMergeCommand}" Size="Large" Text="Mail Merge" telerik:ScreenTip.Title="Finish &amp; Merge"/>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
            <telerik:RadRibbonTab Header="Review">
                <telerik:RadRibbonGroup Header="Proofing">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Check the spelling of text in the document." LargeImage="{telerik:IconResource IconRelativePath=32/EnableSpellCheck.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowSpellCheckingDialogCommand}" Size="Large" Text="Spell Check" telerik:ScreenTip.Title="Spelling"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Comments">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Add a comment about the selection." LargeImage="{telerik:IconResource IconRelativePath=32/NewComment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertCommentCommand}" Size="Large" Text="New Comment" telerik:ScreenTip.Title="Insert Comment"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Delete the selected comment." LargeImage="{telerik:IconResource IconRelativePath=32/DeleteComment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding DeleteCommentCommand}" Size="Large" Text="Delete" telerik:ScreenTip.Title="Delete Comment"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Navigate to the previous comment in the document." LargeImage="{telerik:IconResource IconRelativePath=32/PreviousComment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding GoToPreviousCommentCommand}" Size="Large" Text="Previous" telerik:ScreenTip.Title="Previous Comment"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Navigate to the next comment in the document." LargeImage="{telerik:IconResource IconRelativePath=32/NextComment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding GoToNextCommentCommand}" Size="Large" Text="Next" telerik:ScreenTip.Title="Next Comment"/>
                    <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Click here to show or hide the comments." LargeImage="{telerik:IconResource IconRelativePath=32/ShowHideComments.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleCommentsCommand}" Size="Large" Text="Show/Hide Comments" telerik:ScreenTip.Title="Show/Hide Comments"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Click here to delete all of the comments in the document." LargeImage="{telerik:IconResource IconRelativePath=32/DeleteAllComments.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding DeleteAllCommentsCommand}" Size="Large" Text="Delete All" telerik:ScreenTip.Title="Delete All Comments"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Tracking &amp; Changes">
                    <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Track all changes made to the document, including insertions, deletions, and formatting changes." LargeImage="{telerik:IconResource IconRelativePath=32/TrackChanges.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleTrackChangesCommand}" Size="Large" Text="Track Changes" telerik:ScreenTip.Title="Track Changes"/>
                    <telerik:RadRibbonSplitButton telerik:ScreenTip.Description="Accept and Move to Next." LargeImage="{telerik:IconResource IconRelativePath=32/AcceptChange.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding AcceptRevisionCommand}" Size="Large" Text="Accept" telerik:ScreenTip.Title="Accept">
                        <telerik:RadRibbonSplitButton.DropDownContent>
                            <StackPanel>
                                <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding AcceptRevisionCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/AcceptChange.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Accept and Move to Next"/>
                                <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding AcceptAllRevisionsCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/AcceptChange.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Accept All Changes"/>
                            </StackPanel>
                        </telerik:RadRibbonSplitButton.DropDownContent>
                    </telerik:RadRibbonSplitButton>
                    <telerik:RadRibbonSplitButton telerik:ScreenTip.Description="Reject and Move to Next." LargeImage="{telerik:IconResource IconRelativePath=32/RejectChange.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding RejectRevisionCommand}" Size="Large" Text="Reject" telerik:ScreenTip.Title="Reject">
                        <telerik:RadRibbonSplitButton.DropDownContent>
                            <StackPanel>
                                <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding RejectRevisionCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/RejectChange.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Reject and Move to Next"/>
                                <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding RejectAllRevisionsCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/RejectChange.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Reject All Changes"/>
                            </StackPanel>
                        </telerik:RadRibbonSplitButton.DropDownContent>
                    </telerik:RadRibbonSplitButton>
                    <telerik:RadCollapsiblePanel>
                        <telerik:RadRibbonButton telerik:ScreenTip.Description="Previous change." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding GoToPreviousRevisionCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/PreviousChange.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Previous" telerik:ScreenTip.Title="Previous"/>
                        <telerik:RadRibbonButton telerik:ScreenTip.Description="Next change." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding GoToNextRevisionCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/NextChange.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Next" telerik:ScreenTip.Title="Next"/>
                    </telerik:RadCollapsiblePanel>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Protect">
                    <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Restrict how people edit specific parts of the document." LargeImage="{telerik:IconResource IconRelativePath=32/ProtectDocument.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleDocumentProtectionCommand}" Size="Large" Text="Protect Document" telerik:ScreenTip.Title="Toggle Document Protection"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Shows the dialog for setting editing restrictions to users/groups." LargeImage="{telerik:IconResource IconRelativePath=32/ChangeEditingPermissions.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowChangeEditingPermissionsDialogCommand}" Size="Large" Text="Editing Restrictions" telerik:ScreenTip.Title="Change Editing Restrictions"/>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
            <telerik:RadRibbonTab Header="View">
                <telerik:RadRibbonGroup Header="Document Views">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="View the document as it would look as a Web page." LargeImage="{telerik:IconResource IconRelativePath=32/web-C.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeLayoutModeCommand}" Size="Large" Text="Web Layout" telerik:ScreenTip.Title="Web Layout">
                        <telerik:RadRibbonButton.CommandParameter>
                            <telerik:DocumentLayoutMode>Flow</telerik:DocumentLayoutMode>
                        </telerik:RadRibbonButton.CommandParameter>
                    </telerik:RadRibbonButton>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="View the documetn as it will appear on the printed page." LargeImage="{telerik:IconResource IconRelativePath=32/PageBreak.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeLayoutModeCommand}" Size="Large" Text="Print Layout" telerik:ScreenTip.Title="Print Layout">
                        <telerik:RadRibbonButton.CommandParameter>
                            <telerik:DocumentLayoutMode>Paged</telerik:DocumentLayoutMode>
                        </telerik:RadRibbonButton.CommandParameter>
                    </telerik:RadRibbonButton>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
            <telerik:RadRibbonTab ContextualGroupName="TableTools" Header="Design">
                <telerik:RadRibbonGroup Header="Table Style Options">
                    <telerik:RadCollapsiblePanel>
                        <CheckBox Content="Header Row" telerik:ScreenTip.Description="Display special formatting for the first row of the table." Margin="2" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleTableLookFirstRowOptionCommand}" telerik:ScreenTip.Title="Header Row"/>
                        <CheckBox Content="Total Row" telerik:ScreenTip.Description="Display special formatting for the last row of the table." Margin="2" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleTableLookLastRowOptionCommand}" telerik:ScreenTip.Title="Total Row"/>
                        <CheckBox Content="Banded Rows" telerik:ScreenTip.Description="Display banded rows, in which even rows are formatted differently from odd rows.&amp;#10;&amp;#10;This banding can make tables easier to read." Margin="2" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleTableLookRowBandingOptionCommand}" telerik:ScreenTip.Title="Banded Rows"/>
                        <CheckBox Content="First Column" telerik:ScreenTip.Description="Display special formatting for the first column of the table." Margin="2" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleTableLookFirstColumnOptionCommand}" telerik:ScreenTip.Title="First Column"/>
                        <CheckBox Content="Last Column" telerik:ScreenTip.Description="Display special formatting for the last column of the table." Margin="2" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleTableLookLastColumnOptionCommand}" telerik:ScreenTip.Title="Last Column"/>
                        <CheckBox Content="Banded Columns" telerik:ScreenTip.Description="Display banded columns, in which even columns are formatted differently from odd columns.&amp;#10;&amp;#10;This banding can make tables easier to read." Margin="2" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleTableLookColumnBandingOptionCommand}" telerik:ScreenTip.Title="Banded Columns"/>
                    </telerik:RadCollapsiblePanel>
                </telerik:RadRibbonGroup>

                <telerik:RadRibbonGroup Header="Table Styles">
                    <telerik:TableStylesGallery x:Name="tableStylesGallery" 
                                                       AssociatedRichTextBox="{Binding AssociatedRichTextBox, Mode=OneWay}"/>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
            <telerik:RadRibbonTab ContextualGroupName="TableTools" Header="Layout">
                <telerik:RadRibbonGroup Header="Table">
                    <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding SelectTableEmptyCommand}" telerik:ScreenTip.Description="Select rows, columns, cells, or the entire table." LargeImage="{telerik:IconResource IconRelativePath=32/SelectTableTools.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Size="Large" Text="Select" telerik:ScreenTip.Title="Select Table">
                        <telerik:RadRibbonDropDownButton.DropDownContent>
                            <StackPanel>
                                <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SelectTableCellCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/SelectTableCell.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Select Cell"/>
                                <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SelectTableColumnCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/SelectTableColumn.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Select Column"/>
                                <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SelectTableRowCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/SelectTableRow.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Select Row"/>
                                <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding SelectTableCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/SelectTable.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Select Table"/>
                            </StackPanel>
                        </telerik:RadRibbonDropDownButton.DropDownContent>
                    </telerik:RadRibbonDropDownButton>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Show the Table Properties dialog box to change advanced table properties." LargeImage="{telerik:IconResource IconRelativePath=32/TableProperties.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowTablePropertiesDialogCommand}" Size="Large" Text="Properties" telerik:ScreenTip.Title="Table Properties"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Delete the entire table." LargeImage="{telerik:IconResource IconRelativePath=32/DeleteTable.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding DeleteTableCommand}" Size="Large" Text="Delete" telerik:ScreenTip.Title="Delete Table"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Rows">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert a new row." LargeImage="{telerik:IconResource IconRelativePath=32/InsertTableRow.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertTableRowCommand}" Size="Large" Text="Insert Row" telerik:ScreenTip.Title="Insert Row"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Add a new row directly below the selected row." LargeImage="{telerik:IconResource IconRelativePath=32/InsertTableRowBelow.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertTableRowBelowCommand}" Size="Large" Text="Insert Below" telerik:ScreenTip.Title="Insert Rows Below"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Add a new row directly above the selected row." LargeImage="{telerik:IconResource IconRelativePath=32/InsertTableRowAbove.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertTableRowAboveCommand}" Size="Large" Text="Insert Above" telerik:ScreenTip.Title="Insert Rows Above"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Delete the selected row." LargeImage="{telerik:IconResource IconRelativePath=32/DeleteTableRows.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding DeleteTableRowCommand}" Size="Large" Text="Delete Row" telerik:ScreenTip.Title="Delete Row"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Columns">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert a new column." LargeImage="{telerik:IconResource IconRelativePath=32/InsertTableColumn.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertTableColumnCommand}" Size="Large" Text="Insert Column" telerik:ScreenTip.Title="Insert Column"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Add a new column directly to the left of the selected column." LargeImage="{telerik:IconResource IconRelativePath=32/InsertTableColumnToTheLeft.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertTableColumnToTheLeftCommand}" Size="Large" Text="Insert Left" telerik:ScreenTip.Title="Insert Columns to the Left"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Add a new column directly to the right of the selected column." LargeImage="{telerik:IconResource IconRelativePath=32/InsertTableColumnToTheRight.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertTableColumnToTheRightCommand}" Size="Large" Text="Insert Right" telerik:ScreenTip.Title="Insert Columns to the Right"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Delete the selected column." LargeImage="{telerik:IconResource IconRelativePath=32/DeleteTableColumns.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding DeleteTableColumnCommand}" Size="Large" Text="Delete Column" telerik:ScreenTip.Title="Delete Column"/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Merge">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Merge the selected cells into one cell." LargeImage="{telerik:IconResource IconRelativePath=32/MergeTableCells.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding MergeTableCellsCommand}" Size="Large" Text="Merge Cells" telerik:ScreenTip.Title="Merge Cells"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Unmerge the current merged cell." LargeImage="{telerik:IconResource IconRelativePath=32/SplitTableCell.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding UnmergeTableCellsCommand}" Size="Large" Text="Unmerge Cell" telerik:ScreenTip.Title="Unmerge Cell."/>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Cell Size">
                    <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding ChangeTableColumnsLayoutModeCommand}" telerik:ScreenTip.Description="Automatically resize the column widths based on the size of the text in them or keep the widths with fixed size." LargeImage="{telerik:IconResource IconRelativePath=32/AutoFit.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Size="Large" Text="AutoFit" telerik:ScreenTip.Title="AutoFit/Fixed">
                        <telerik:RadRibbonDropDownButton.DropDownContent>
                            <StackPanel>
                                <telerik:RadRibbonButton CommandParameter="AutoFit" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTableColumnsLayoutModeCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/AutoFItToWindow.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="AutoFit to Window"/>
                                <telerik:RadRibbonButton CommandParameter="Fixed" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeTableColumnsLayoutModeCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/FixedColumnWidth.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Fixed Column Width"/>
                            </StackPanel>
                        </telerik:RadRibbonDropDownButton.DropDownContent>
                    </telerik:RadRibbonDropDownButton>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Alignment">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <telerik:RadToggleButton Grid.Column="0" CommandParameter="Left,Top" telerik:ScreenTip.Description="Align text to the top left corner of the cell." IsTabStop="False" IsBackgroundVisible="False" Padding="2" Grid.Row="0" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding TableCellContentAlignmentCommand}" telerik:ScreenTip.Title="Align Top Left">
                            <Image Source="{telerik:IconResource IconRelativePath=16/LeftTopCellAlignment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                        </telerik:RadToggleButton>
                        <telerik:RadToggleButton Grid.Column="1" CommandParameter="Center,Top" telerik:ScreenTip.Description="Center text and align it to the top of the cell." IsTabStop="False" IsBackgroundVisible="False" Padding="2" Grid.Row="0" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding TableCellContentAlignmentCommand}" telerik:ScreenTip.Title="Align Top Center">
                            <Image Source="{telerik:IconResource IconRelativePath=16/CenterTopCellAlignment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                        </telerik:RadToggleButton>
                        <telerik:RadToggleButton Grid.Column="2" CommandParameter="Right,Top" telerik:ScreenTip.Description="Align text to the top right corner of the cell." IsTabStop="False" IsBackgroundVisible="False" Padding="2" Grid.Row="0" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding TableCellContentAlignmentCommand}" telerik:ScreenTip.Title="Align Top Right">
                            <Image Source="{telerik:IconResource IconRelativePath=16/RightTopCellAlignment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                        </telerik:RadToggleButton>
                        <telerik:RadToggleButton Grid.Column="0" CommandParameter="Left,Center" telerik:ScreenTip.Description="Center text vertically and align it to the left side of the cell." IsTabStop="False" IsBackgroundVisible="False" Padding="2" Grid.Row="1" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding TableCellContentAlignmentCommand}" telerik:ScreenTip.Title="Align Center Left">
                            <Image Source="{telerik:IconResource IconRelativePath=16/LeftMiddleCellAlignment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                        </telerik:RadToggleButton>
                        <telerik:RadToggleButton Grid.Column="1" CommandParameter="Center,Center" telerik:ScreenTip.Description="Center text horizontally and vertically within the cell." IsTabStop="False" IsBackgroundVisible="False" Padding="2" Grid.Row="1" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding TableCellContentAlignmentCommand}" telerik:ScreenTip.Title="Align Center">
                            <Image Source="{telerik:IconResource IconRelativePath=16/CenterMiddleCellAlignment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                        </telerik:RadToggleButton>
                        <telerik:RadToggleButton Grid.Column="2" CommandParameter="Right,Center" telerik:ScreenTip.Description="Center text vertically and align it to the right side of the cell." IsTabStop="False" IsBackgroundVisible="False" Padding="2" Grid.Row="1" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding TableCellContentAlignmentCommand}" telerik:ScreenTip.Title="Align Center Right">
                            <Image Source="{telerik:IconResource IconRelativePath=16/RightMiddleCellAlignment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                        </telerik:RadToggleButton>
                        <telerik:RadToggleButton Grid.Column="0" CommandParameter="Left,Bottom" telerik:ScreenTip.Description="Align text to the bottom left corner of the cell." IsTabStop="False" IsBackgroundVisible="False" Padding="2" Grid.Row="2" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding TableCellContentAlignmentCommand}" telerik:ScreenTip.Title="Align Bottom Left">
                            <Image Source="{telerik:IconResource IconRelativePath=16/LeftBottomCellAlignment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                        </telerik:RadToggleButton>
                        <telerik:RadToggleButton Grid.Column="1" CommandParameter="Center,Bottom" telerik:ScreenTip.Description="Center text and align it to the bottom of the cell." IsTabStop="False" IsBackgroundVisible="False" Padding="2" Grid.Row="2" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding TableCellContentAlignmentCommand}" telerik:ScreenTip.Title="Align Bottom Center">
                            <Image Source="{telerik:IconResource IconRelativePath=16/CenterBottomCellAlignment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                        </telerik:RadToggleButton>
                        <telerik:RadToggleButton Grid.Column="2" CommandParameter="Right,Bottom" telerik:ScreenTip.Description="Align text to the bottom right corner of the cell." IsTabStop="False" IsBackgroundVisible="False" Padding="2" Grid.Row="2" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding TableCellContentAlignmentCommand}" telerik:ScreenTip.Title="Align Bottom Right">
                            <Image Source="{telerik:IconResource IconRelativePath=16/RightBottomCellAlignment.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None"/>
                        </telerik:RadToggleButton>
                    </Grid>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Data">
                    <telerik:RadRibbonToggleButton Size="Large"
                                                   LargeImage="{telerik:IconResource IconRelativePath=32/RepeatTableRow.png, IconSources={StaticResource RichTextBoxUIIconSources}}"
                                                   telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleTableRowRepeatOnEveryPageCommand}" Text="Repeat Header Rows"
                                                   telerik:ScreenTip.Description="Mark multiple rows as header rows. If your table spans multiple pages the header rows will appear on every page." 
                                                   telerik:ScreenTip.Title="Repeat Header Rows" />
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
            <telerik:RadRibbonTab ContextualGroupName="HeaderFooterTools" Header="Design" Width="140">
                <telerik:RadRibbonGroup Header="Insert">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert the current date or time into the current document." LargeImage="{telerik:IconResource IconRelativePath=32/InsertDateTime.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ShowInsertDateTimeDialogCommand}" Size="Large" Text="Date &amp; Time" telerik:ScreenTip.Title="Insert Date and Time"/>
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Insert page numbers into the document." LargeImage="{telerik:IconResource IconRelativePath=32/InsertPageNumber.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding InsertPageFieldCommand}" Size="Large" Text="Page Number" telerik:ScreenTip.Title="Insert Page Number"/>
                </telerik:RadRibbonGroup>

                <telerik:RadRibbonGroup Header="Navigation">
                    <StackPanel>
                        <telerik:RadRibbonToggleButton telerik:ScreenTip.Description="Link to the previous section so that nthe header and footer in the current section contain the same content as in the previous section." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleHeaderFooterLinkToPreviousCommand}" Size="Medium" SmallImage="{telerik:IconResource IconRelativePath=16/LinkToPreviousHeaderFooter.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Text="Link to Previous" telerik:ScreenTip.Title="Link to Previous"/>
                    </StackPanel>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Options">
                    <StackPanel>
                        <CheckBox Content="Different First Page" telerik:ScreenTip.Description="Specify a unique header and footer for the first page of the document." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleDifferentFirstPageHeaderFooterCommand}" telerik:ScreenTip.Title="Different First Page"/>
                        <CheckBox Content="Different Odd &amp; Even Pages" telerik:ScreenTip.Description="Specify that odd-numbered pages should have a different header and footer from even-numbered pages." telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ToggleDifferentOddAndEvenPagesHeaderFooterCommand}" telerik:ScreenTip.Title="Different Odd &amp; Even Pages"/>
                    </StackPanel>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Position">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Image Grid.Column="0" Grid.Row="0" Source="{telerik:IconResource IconRelativePath=16/HeaderFromTop.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None" VerticalAlignment="Center"/>
                        <telerik:Label Padding="0" IsEnabled="{Binding ElementName=HeaderAreaMarginNumericUpDown, Path=IsEnabled}" Grid.Column="1" Grid.Row="0" Content=" Header from Top: " VerticalAlignment="Center"/>
                        <telerik:RadNumericUpDown x:Name="HeaderAreaMarginNumericUpDown" Grid.Column="2" telerik:ScreenTip.Description="Specify the height of the header area." IsInteger="true" Minimum="0" NullValue="48" Grid.Row="0" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeSectionHeaderTopMarginCommand}" telerik:ScreenTip.Title="Header Position from Top"/>
                        <Image Grid.Column="0" Margin="0 1 0 0" Grid.Row="1" Source="{telerik:IconResource IconRelativePath=16/FooterFromBottom.png,IconSources={StaticResource RichTextBoxUIIconSources}}" Stretch="None" VerticalAlignment="Center"/>
                        <telerik:Label Padding="0" IsEnabled="{Binding ElementName=FooterAreaMarginNumericUpDown, Path=IsEnabled}" Grid.Column="1" Margin="0 1 0 0" Grid.Row="1" Content=" Footer from Bottom: " VerticalAlignment="Center"/>
                        <telerik:RadNumericUpDown x:Name="FooterAreaMarginNumericUpDown" Grid.Column="2" telerik:ScreenTip.Description="Specify the height of the footer area." IsInteger="true" Margin="0 1 0 0" Minimum="0" NullValue="48" Grid.Row="1" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ChangeSectionFooterBottomMarginCommand}" telerik:ScreenTip.Title="Footer Position from Bottom"/>
                    </Grid>
                </telerik:RadRibbonGroup>
                <telerik:RadRibbonGroup Header="Close">
                    <telerik:RadRibbonButton telerik:ScreenTip.Description="Close the Header and Footer Mode." LargeImage="{telerik:IconResource IconRelativePath=32/ExitHeaderFooterEditMode.png,IconSources={StaticResource RichTextBoxUIIconSources}}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding ExitHeaderFooterEditModeCommand}" Size="Large" Text="Close Header and Footer" telerik:ScreenTip.Title="Close Header and Footer"/>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
        </telerik:RadRichTextBoxRibbonUI>


        <telerik:DocxDataProvider RichTextBox="{Binding ElementName=radRichTextBox}" Docx="{Binding Document, Mode=TwoWay}" />

        <telerik:DocumentRuler Grid.Row="1">
            <telerik:RadRichTextBox x:Name="radRichTextBox" Background="{appearance:Office2016Resource Resource=DocumentBackground}" LayoutMode="Paged" >
                <telerik:RadRichTextBox.Resources>
                    <Style TargetType="telerik:DocumentWebLayoutPresenter">
                        <Setter Property="Template" Value="{StaticResource DocumentWebLayoutPresenterStyle}" />
                    </Style>
                    <Style TargetType="telerik:DocumentPrintLayoutPresenter">
                        <Setter Property="Template" Value="{StaticResource DocumentPrintLayoutPresenterStyle}" />
                    </Style>
                </telerik:RadRichTextBox.Resources>
            </telerik:RadRichTextBox>
        </telerik:DocumentRuler>

        <telerik:RadRichTextBoxStatusBar Grid.Row="2" AssociatedRichTextBox="{Binding ElementName=radRichTextBox, Mode=OneTime}" />
    </Grid>
</UserControl>
