Chinese input Question (data to be stored in database as bytes[] & html formation)

3 posts, 1 answers
  1. Jiaqi
    Jiaqi avatar
    6 posts
    Member since:
    Nov 2011

    Posted 10 Jun 2012 Link to this post

    The data to be stored in database as bytes[] & html formation.if I input english in richtextbox,It works well. But when I input chinese(Pinyin) in richtextbox , I got some errors. I am a beginner. Could you give me a hand?

    Errors:

    {System.Collections.Generic.KeyNotFoundException: 给定关键字不在字典中。
       位于 System.Collections.Generic.Dictionary`2.get_Item(TKey key)
       位于 Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlDocumentExporter.GetClassesForStyle(StyleDefinition style, StringBuilder sb)
       位于 Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlDocumentExporter.GetClassesForElement(DocumentElement de)
       位于 Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlDocumentExporter.AddStyleForSpan(Span span)
       位于 Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlDocumentExporter.ExportSpan(Paragraph paragraph, Span span)
       位于 Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlDocumentExporter.ExportInline(Paragraph paragraph, Inline inline)
       位于 Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlDocumentExporter.ExportParagraphContents(Paragraph paragraph)
       位于 Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlDocumentExporter.ExportBlockContainer(IBlockContainer blockContainer)
       位于 Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlDocumentExporter.ExportBodyContent()
       位于 Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlDocumentExporter.ExportBody()
       位于 Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlDocumentExporter.ExportDocumentInternal(RadDocument document, Stream output)
       位于 Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlDocumentExporter.Export(RadDocument document, Stream output)
       位于 Telerik.Windows.Documents.FormatProviders.Html.HtmlFormatProvider.Export(RadDocument document, Stream output)
       位于 Telerik.Windows.Documents.FormatProviders.DocumentFormatProviderBase.Export(RadDocument document)
       位于 PMMSilverlight.Common.RichTextBoxChildWinStream.OnButtonAcceptClicked(Object sender, RoutedEventArgs e)}
    My code:
             I have two page: Add & RichTextBoxChildWinStream
    Add.xaml
    <telerik:RadRichTextBox x:Name="radRTBContent" IsReadOnly="True" DocumentInheritsDefaultStyleSettings="True"  Height="212"  HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" IsContextMenuEnabled="True" IsSelectionMiniToolBarEnabled="True" IsSpellCheckingEnabled="False"  Width="680" GotFocus="radRTBContent_GotFocus" />
    Add.xaml.cs
    //RichTextBox ChildWindows
           RichTextBoxChildWinStream childWindowRichTextBox;
       /// <summary>
           /// display child windows data
           /// </summary>
           /// <param name="sender"></param>
           /// <param name="e"></param>
           private void childWindowRichTextBox_OkClicked(object sender, EventArgs e)
           {
              
               IDocumentFormatProvider provider = new HtmlFormatProvider();
               this.radRTBContent.Document = provider.Import(childWindowRichTextBox.ContentString);
           }
           /// <summary>
           /// child windows display
           /// </summary>
           /// <param name="sender"></param>
           /// <param name="e"></param>
           private void radRTBContent_GotFocus(object sender, RoutedEventArgs e)
           {
               IDocumentFormatProvider provider = new HtmlFormatProvider();
               var content = provider.Export(this.radRTBContent.Document);
               childWindowRichTextBox = new Common.RichTextBoxChildWinStream(content);
               childWindowRichTextBox.Header = new TextBlock { Text = "Editor", Visibility = Visibility.Collapsed };
               childWindowRichTextBox.OkClicked += new EventHandler(childWindowRichTextBox_OkClicked);
               childWindowRichTextBox.ShowDialog();
            }
    RichTextBoxChildWinStream.xaml
    <Grid>
                <Grid  Name="gridRadRtbParent">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <telerik:DocumentRuler AssociatedRichTextBox="{Binding ElementName=radRichTextBox1}" Grid.Row="1" />
                <telerik:RadRichTextBox Grid.Row="1" HorizontalAlignment="Stretch" IsContextMenuEnabled="True" IsSelectionMiniToolBarEnabled="True" IsSpellCheckingEnabled="True" LayoutMode="Paged" Margin="24,24,0,0" Name="radRichTextBox1" VerticalAlignment="Stretch" />
                <telerik:RadRichTextBoxRibbonUI BackstageClippingElement="{Binding ElementName=gridRadRtbParent}" CollapseThresholdSize="50,50" DataContext="{Binding Path=Commands, ElementName=radRichTextBox1}" Margin="0,-9,0,0" ApplicationName="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Content}">
                    <telerik:RadRichTextBoxRibbonUI.Backstage>
                        <telerik:RadRibbonBackstage>
                            <telerik:RadRibbonBackstageItem Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Open}" Icon="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/open.png" IsSelectable="false" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=OpenDocumentCommand}" />
                            <telerik:RadRibbonBackstageItem Header="Save" Icon="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/save.png" IsSelectable="false" Click="OnButtonAcceptClicked"  />
                            <telerik:RadRibbonBackstageItem Header="Save As" Icon="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/saveas.png" IsDefault="false">
                                <StackPanel HorizontalAlignment="Stretch" Margin="20,20,0,0">
                                    <TextBlock FontFamily="Verdana" FontSize="18" FontWeight="ExtraBold" Foreground="#FF5E5E7C" Text="Save As" />
                                    <Rectangle Fill="Gray" Height="1" HorizontalAlignment="Left" Width="410" />
                                    <StackPanel Margin="0,30,0,0" Orientation="Horizontal">
                                        <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="docx" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="true" Width="90">
                                            <StackPanel Width="90">
                                                <Image HorizontalAlignment="Center" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/worddoc.png" Stretch="None" />
                                            </StackPanel>
                                        </telerik:RadRibbonButton>
                                        <StackPanel Margin="20,0,0,0">
                                            <TextBlock FontSize="18" FontWeight="ExtraBold" Foreground="#FF5E5E7C" Text="Word Document" />
                                            <TextBlock FontFamily="Verdana" FontSize="13" Text="Save the file as a Word document." TextWrapping="Wrap" 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 Path=SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="true" Width="90">
                                            <StackPanel Width="90">
                                                <Image HorizontalAlignment="Center" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/Pdf.png" Stretch="None" />
                                            </StackPanel>
                                        </telerik:RadRibbonButton>
                                        <StackPanel Margin="20,0,0,0">
                                            <TextBlock FontSize="18" FontWeight="ExtraBold" Foreground="#FF5E5E7C" Text="PDF Document" />
                                            <TextBlock FontFamily="Verdana" FontSize="13" Text="Save document as a PDF file." TextWrapping="Wrap" 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 Path=SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="true" Width="90">
                                            <StackPanel Width="90">
                                                <Image HorizontalAlignment="Center" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/html.png" Stretch="None" />
                                            </StackPanel>
                                        </telerik:RadRibbonButton>
                                        <StackPanel Margin="20,0,0,0">
                                            <TextBlock FontSize="18" FontWeight="ExtraBold" Foreground="#FF5E5E7C" Text="HTML Document" />
                                            <TextBlock FontFamily="Verdana" FontSize="13" Text="Save the file as a HTML document." TextWrapping="Wrap" 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 Path=SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="true" Width="90">
                                            <StackPanel Width="90">
                                                <Image HorizontalAlignment="Center" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/Rtf.png" Stretch="None" />
                                            </StackPanel>
                                        </telerik:RadRibbonButton>
                                        <StackPanel Margin="20,0,0,0">
                                            <TextBlock FontSize="18" FontWeight="ExtraBold" Foreground="#FF5E5E7C" Text="Rich Text Format" />
                                            <TextBlock FontFamily="Verdana" FontSize="13" Text="Save document in Rich Text Format." TextWrapping="Wrap" 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 Path=SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="true" Width="90">
                                            <StackPanel Width="90">
                                                <Image HorizontalAlignment="Center" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/PlainText.png" Stretch="None" />
                                            </StackPanel>
                                        </telerik:RadRibbonButton>
                                        <StackPanel Margin="20,0,0,0">
                                            <TextBlock FontSize="18" FontWeight="ExtraBold" Foreground="#FF5E5E7C" Text="Plain text" />
                                            <TextBlock FontFamily="Verdana" FontSize="13" Text="Save document in plain text format." TextWrapping="Wrap" 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 Path=SaveCommand}" telerik:RadRichTextBoxRibbonUI.ShouldCloseBackstage="true" Width="90">
                                            <StackPanel Width="90">
                                                <Image HorizontalAlignment="Center" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/Xaml.png" Stretch="None" />
                                            </StackPanel>
                                        </telerik:RadRibbonButton>
                                        <StackPanel Margin="20,0,0,0">
                                            <TextBlock FontSize="18" FontWeight="ExtraBold" Foreground="#FF5E5E7C" Text="XAML Document" />
                                            <TextBlock FontFamily="Verdana" FontSize="13" Text="Save document as a XAML file." TextWrapping="Wrap" Width="300" />
                                        </StackPanel>
                                    </StackPanel>
                                </StackPanel>
                            </telerik:RadRibbonBackstageItem>
                            <telerik:RadRibbonBackstageItem Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Print}" Icon="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/print.png" IsDefault="true">
                                <StackPanel HorizontalAlignment="Stretch" Margin="20,20,0,0">
                                    <TextBlock FontFamily="Verdana" FontSize="18" FontWeight="ExtraBold" Foreground="#FF5E5E7C" Text="Print打印" />
                                    <Rectangle Fill="Gray" Height="1" HorizontalAlignment="Left" Width="410" />
                                    <StackPanel Margin="0,30,0,0" Orientation="Horizontal">
                                        <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="Html" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=PrintCommand}" Width="90">
                                            <StackPanel Width="90">
                                                <Image HorizontalAlignment="Center" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/print.png" Stretch="None" />
                                            </StackPanel>
                                        </telerik:RadRibbonButton>
                                        <StackPanel Margin="20,0,0,0">
                                            <TextBlock FontSize="18" FontWeight="ExtraBold" Foreground="#FF5E5E7C" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.HTMLPrint}" />
                                            <TextBlock FontFamily="Verdana" FontSize="13" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.SelectPrinterandnumber}" TextWrapping="Wrap" Width="300" />
                                        </StackPanel>
                                    </StackPanel>
                                    <StackPanel Margin="0,30,0,0" Orientation="Horizontal">
                                        <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="Native" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=PrintCommand}" Width="90">
                                            <StackPanel Width="90">
                                                <Image HorizontalAlignment="Center" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/pagesetup.png" Stretch="None" />
                                            </StackPanel>
                                        </telerik:RadRibbonButton>
                                        <StackPanel Margin="20,0,0,0">
                                            <TextBlock FontSize="18" FontWeight="ExtraBold" Foreground="#FF5E5E7C" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.NativePrint}" />
                                            <TextBlock FontFamily="Verdana" FontSize="13" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.DefaultPrinter}" TextWrapping="Wrap" Width="300" />
                                        </StackPanel>
                                    </StackPanel>
                                    <StackPanel Margin="0,30,0,0" Orientation="Horizontal">
                                        <telerik:RadRibbonButton BorderBrush="Gray" CommandParameter="HtmlPreview" CornerRadius="3" Height="80" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=PrintCommand}" Width="90">
                                            <StackPanel Width="90">
                                                <Image HorizontalAlignment="Center" Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/ApplicationMenu/print_preview.png" Stretch="None" />
                                            </StackPanel>
                                        </telerik:RadRibbonButton>
                                        <StackPanel Margin="20,0,0,0">
                                            <TextBlock FontSize="18" FontWeight="ExtraBold" Foreground="#FF5E5E7C" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.PrintPreview}" />
                                            <TextBlock FontFamily="Verdana" FontSize="13" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.PreviewChangesPages}" TextWrapping="Wrap" Width="300" />
                                        </StackPanel>
                                    </StackPanel>
                                </StackPanel>
                            </telerik:RadRibbonBackstageItem>
                        </telerik:RadRibbonBackstage>
                    </telerik:RadRichTextBoxRibbonUI.Backstage>
                    <telerik:RadRichTextBoxRibbonUI.QuickAccessToolBar>
                        <telerik:QuickAccessToolBar>
                            <telerik:RadRibbonButton Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/save.png" Text="Save" Click="OnButtonAcceptClicked" />
                            <telerik:RadRibbonSplitButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=UndoCommand}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/undo.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Undo}">
                                <telerik:RadRibbonSplitButton.DropDownContent>
                                    <telerik:MultipleUndoControl telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=MultipleUndoCommand}" />
                                </telerik:RadRibbonSplitButton.DropDownContent>
                            </telerik:RadRibbonSplitButton>
                            <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=RedoCommand}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/redo.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Redo}" />
                        </telerik:QuickAccessToolBar>
                    </telerik:RadRichTextBoxRibbonUI.QuickAccessToolBar>
                    <telerik:RadRichTextBoxRibbonUI.Resources>
                        <telerik:FontFamiliesProvider x:Key="FontFamiliesProvider" />
                    </telerik:RadRichTextBoxRibbonUI.Resources>
                    <telerik:RadRibbonTab Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Home}">
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Clipboard}">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="0" Variant="Medium" />
                            </telerik:RadRibbonGroup.Variants>
                            <StackPanel>
                                <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=CutCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.PutItOnClipboard}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Cut}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/cut.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Cut}" />
                                <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=CopyCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.CopyAndPutItOnClipboard}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Copy}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/copy.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Copy}" />
                                <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=PasteCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.PasteClipboardContents}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Paste}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/paste.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Paste}" />
                            </StackPanel>
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup DialogLauncherVisibility="Visible" Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Font}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowFontPropertiesDialogCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.ShowfontDialogBox}" telerik:ScreenTip.Icon="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/FontDialog.png" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Font}">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="4" Variant="Medium" />
                                <telerik:GroupVariant Priority="6" Variant="Small" />
                                <telerik:GroupVariant Priority="7" Variant="Collapsed" />
                            </telerik:RadRibbonGroup.Variants>
                            <telerik:RadOrderedWrapPanel>
                                <StackPanel Orientation="Horizontal">
                                    <telerik:RadRibbonComboBox CanAutocompleteSelectItems="False" CanKeyboardNavigationSelectItems="False" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=SelectedValue}" Height="21" IsReadOnly="True" ItemsSource="{Binding Source={StaticResource FontFamiliesProvider}, Path=RegisteredFonts}" OpenDropDownOnFocus="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontFamilyCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.ChangeFontFamily}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Font}" Width="132" />
                                    <telerik:RadRibbonComboBox CanAutocompleteSelectItems="False" CanKeyboardNavigationSelectItems="False" CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=SelectedItem.Tag}" Height="21" IsEditable="True" IsReadOnly="True" IsTextSearchEnabled="False" OpenDropDownOnFocus="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontSizeCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.ChangeFontSize}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.FontSize}" Width="45">
                                        <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:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=IncrementFontSizeCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.IncreaseFontSize}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.GrowFont}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/font-increasesize.png" />
                                    <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=DecrementFontSizeCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.DecreaseFontSize}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.ShrinkFont}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/font-decreasesize.png" />
                                </telerik:RadButtonGroup>
                                <telerik:RadButtonGroup>
                                    <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ClearFormattingCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.ClearFormattingFromSelectionLeavingText}" telerik:ScreenTip.Title="Clear Formatting" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/ClearFormatting16.png" />
                                </telerik:RadButtonGroup>
                                <telerik:RadButtonGroup>
                                    <telerik:RadRibbonToggleButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleBoldCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.SelectedTextBold}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Bold}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/bold.png" />
                                    <telerik:RadRibbonToggleButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleItalicCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.SelectedTextItalicize}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Italic}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/italic.png" />
                                    <telerik:RadRibbonSplitButton IsToggle="True" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleUnderlineCommand}" telerik:ScreenTip.Description="Underline the selected text." telerik:ScreenTip.Title="Underline" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/underline.png">
                                        <telerik:RadRibbonSplitButton.DropDownContent>
                                            <telerik:RadGallery ItemHeight="26" ItemWidth="156" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeUnderlineDecorationCommand}" ViewportHeight="210" ViewportWidth="157">
                                                <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline1.png" Tag="Line" />
                                                <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline2.png" Tag="DoubleLine" />
                                                <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline3.png" Tag="ThickLine" />
                                                <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline4.png" Tag="DottedLine" />
                                                <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline5.png" Tag="DashedLine" />
                                                <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline6.png" Tag="DotDashedLine" />
                                                <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline7.png" Tag="DotDotDashedLine" />
                                                <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/underline8.png" Tag="Wave" />
                                            </telerik:RadGallery>
                                        </telerik:RadRibbonSplitButton.DropDownContent>
                                    </telerik:RadRibbonSplitButton>
                                    <telerik:RadRibbonToggleButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleStrikethroughCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Draw_a_line_through_the_middle_of_the_selected_text}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Strikethrough}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/Strikethrough16.png" />
                                    <telerik:RadRibbonToggleButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleSubscriptCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Create_small_letters_below_the_text_baseline}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Subscript}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/subscript.png" />
                                    <telerik:RadRibbonToggleButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleSuperscriptCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Create_small_text_above_the_line_of_text}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Superscript}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/superscript.png" />
                                </telerik:RadButtonGroup>
                                <telerik:RadButtonGroup>
                                    <telerik:HighlightColorPicker AutomaticColor="Transparent" Height="22" Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/highlight.png" NoColorText="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.No_color}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontHighlightColorCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Make_text_look_like_it_was_marked_with_a_highlighter_pen}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Text_Highlight_Color}" SelectedColor="Yellow" />
                                    <telerik:HighlightColorPicker Height="22" Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/FontForeColor.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeFontForeColorCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Change_the_text_color}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Font_Color}" SelectedColor="Red" />
                                </telerik:RadButtonGroup>
                            </telerik:RadOrderedWrapPanel>
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup DialogLauncherVisibility="Visible" Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Paragraph}" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowParagraphPropertiesDialogCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Show_the_Paragraph_dialog_box}" telerik:ScreenTip.Icon="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/PropertiesDialog.png" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Paragraph}">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="3" Variant="Medium" />
                                <telerik:GroupVariant Priority="5" Variant="Collapsed" />
                            </telerik:RadRibbonGroup.Variants>
                            <telerik:RadOrderedWrapPanel>
                                <telerik:RadButtonGroup>
                                    <telerik:RadRibbonToggleButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleBulletsCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Start_a_bulleted_list}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Bullets}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/list-bullets.png" />
                                    <telerik:RadRibbonToggleButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleNumberedCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Start_a_numbered_list}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Numbering}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/list-numbered.png" />
                                    <telerik:RadRibbonDropDownButton telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Start_a_multilevel_list_Click_the_arrow_to_choose_different_multilevel_list_styles}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.MultilevelList}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/MultilevelList.png">
                                        <telerik:RadRibbonDropDownButton.DropDownContent>
                                            <StackPanel>
                                                <telerik:RadGroupHeader Content="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.ListLibrary}" />
                                                <telerik:RadGallery ItemHeight="88" ItemWidth="88" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeListStyleCommand}" ViewportHeight="176" ViewportWidth="266">
                                                    <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListNone.png" Tag="None" />
                                                    <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListBulleted.png" Tag="Bulleted" />
                                                    <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListNumbered.png" Tag="Numbered" />
                                                    <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListNumberedParenthesis.png" Tag="NumberedParenthesis" />
                                                    <telerik:RadGalleryItem Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/MultilevelListNumberedHierarchical.png" Tag="NumberedHierarchical" />
                                                </telerik:RadGallery>
                                            </StackPanel>
                                        </telerik:RadRibbonDropDownButton.DropDownContent>
                                    </telerik:RadRibbonDropDownButton>
                                </telerik:RadButtonGroup>
                                <telerik:RadButtonGroup>
                                    <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=DecrementParagraphLeftIndentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Decrease_the_indent_level_of_the_paragraph}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Decrease_Indent}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/outdent.png" />
                                    <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=IncrementParagraphLeftIndentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Increase_the_indent_level_of_the_paragraph}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Increase_Indent}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/indent.png" />
                                </telerik:RadButtonGroup>
                                <telerik:RadButtonGroup>
                                    <telerik:RadRibbonToggleButton CommandParameter="LeftToRight" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeParagraphFlowDirectionCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Set_the_direction_of_text_to_be_displayed_from_left_to_right}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Left_To_Right_Text_Direction}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/LeftToRightFlowDirection.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Left_To_Right_Text_Direction}" />
                                    <telerik:RadRibbonToggleButton CommandParameter="RightToLeft" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeParagraphFlowDirectionCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Set_the_direction_of_text_to_be_displayed_from_right_to_left}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Right_To_Left_Text_Direction}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/RightToLeftFlowDirection.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Right_To_Left_Text_Direction}" />
                                </telerik:RadButtonGroup>
                                <telerik:RadButtonGroup>
                                    <telerik:RadRibbonToggleButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleFormattingSymbolsCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Show_paragraph_marks_and_other_hidden_formatting_symbols}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.ShowOrHide_Formatting_Symbols}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/formatting-symbols.png" />
                                </telerik:RadButtonGroup>
                                <telerik:RadButtonGroup>
                                    <telerik:RadRibbonToggleButton CommandParameter="Left" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeTextAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_text_to_the_left}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Text_Left}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/alignleft.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Left}" />
                                    <telerik:RadRibbonToggleButton CommandParameter="Center" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeTextAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Center_text}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Center}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/aligncenter.png" Text="Center" />
                                    <telerik:RadRibbonToggleButton CommandParameter="Right" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeTextAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_text_to_the_right}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Text_Right}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/alignright.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Right}" />
                                    <telerik:RadRibbonToggleButton CommandParameter="Justify" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeTextAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_text_to_both_left_and_right_margins_adding_extra_space_between_words_as_necessary}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Justify}" Size="Small" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/alignjustify.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Justify}" />
                                </telerik:RadButtonGroup>
                                <telerik:RadButtonGroup>
                                    <telerik:HighlightColorPicker AutomaticColor="Transparent" Height="20" Image="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/ParagraphBackgroundColor.png" NoColorText="No color" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeParagraphBackgroundColorCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Color_the_background_behind_the_selected_text_or_paragraph}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Shading}" SelectedColor="Transparent" />
                                </telerik:RadButtonGroup>
                            </telerik:RadOrderedWrapPanel>
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Editing_Proofing}">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="1" Variant="Medium" />
                                <telerik:GroupVariant Priority="2" Variant="Collapsed" />
                            </telerik:RadRibbonGroup.Variants>
                            <StackPanel>
                                <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowFindReplaceDialogCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Find_or_replace_text_in_the_document}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.FindOrReplace}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/Find.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.FindOrReplace}" />
                                <telerik:RadRibbonToggleButton CollapseToSmall="WhenGroupIsMedium" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ToggleSpellCheckingCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.EnableOrDisable_spell_checking}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Spell_Check}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/EnableSpellCheck.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Enable_Spell_Check}" />
                                <telerik:RadRibbonButton CollapseToSmall="WhenGroupIsMedium" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=OpenContextMenuOnNextSpellingErrorCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Open_context_menu_on_next_spelling_error}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Next_Error}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/FindNextSpellingError.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Find_Next_Error}" />
                            </StackPanel>
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Styles}">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="1" Variant="Medium" />
                                <telerik:GroupVariant Priority="2" Variant="Collapsed" />
                            </telerik:RadRibbonGroup.Variants>
                            <telerik:StylesGallery AssociatedRichTextBox="{Binding Path=AssociatedRichTextBox, Mode=OneWay}" />
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/ChangeStyles.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowManageStylesDialogCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Change_the_set_of_styles_colors_fonts_and_paragraph_spacing_used_in_this_document}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Change_Styles}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Change_Styles}" />
                        </telerik:RadRibbonGroup>
                    </telerik:RadRibbonTab>
                    <telerik:RadRibbonTab Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert}">
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Pages}">
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageBreak.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=InsertPageBreakCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Start_the_next_page_at_the_current_position}" telerik:ScreenTip.Title="Page Break分页" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Page_Break}" />
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Tables}">
                            <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding Path=InsertTableCommand}" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertTable.png" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_a_table_into_the_document}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Table}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert}">
                                <telerik:RadRibbonDropDownButton.DropDownContent>
                                    <StackPanel>
                                        <telerik:RadRibbonButton ClickMode="Press">
                                            <telerik:TableSizePicker Command="{Binding Path=InsertTableCommand}" />
                                        </telerik:RadRibbonButton>
                                        <telerik:RadMenuItem IsSeparator="True" />
                                        <telerik:RadRibbonButton HorizontalAlignment="Stretch" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowInsertTableDialogCommand}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/InsertTable.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Table}" />
                                    </StackPanel>
                                </telerik:RadRibbonDropDownButton.DropDownContent>
                            </telerik:RadRibbonDropDownButton>
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Illustrations}">
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/Picture.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=InsertPictureCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_a_picture_from_a_file}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_a_picture_from_a_file}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Picture}" />
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Links}">
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/inserthyperlink.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowInsertHyperlinkDialogCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Create_a_link_to_a_Web_page_picture_or_an_email_address}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.String1Insert_Hyperlink}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Hyperlink}" />
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertBookmark.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowManageBookmarksDialogCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Create_a_bookmark_to_assign_a_name_to_a_specific_point_in_a_document}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Bookmark}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Bookmark}" />
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Symbol}">
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/Symbol.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowInsertSymbolWindowCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_symbols_that_are_not_on_your_keyboard_such_as_copyright_symbols_trademark_symbols_paragraph_marks_and_Unicode_characters}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Symbol}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Symbol}" />
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Header_Footer}">
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/EditHeader.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=EditHeaderCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Edit_the_header_of_the_document}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Header}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Header}" />
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/EditFooter.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=EditFooterCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Edit_the_footer_of_the_document}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Footer}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Footer}" />
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Text}">
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertDateTime.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowInsertDateTimeDialogCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_the_current_date_or_time_into_the_current_document}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Date_and_Time}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Date_Time}" />
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertPageNumber.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=InsertPageFieldCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_page_numbers_into_the_document}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Page_Number}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Page_Number}" />
                        </telerik:RadRibbonGroup>
                    </telerik:RadRibbonTab>
                    <telerik:RadRibbonTab Header="Page Layout">
                        <telerik:RadRibbonGroup Header="Page Setup">
                            <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding Path=ChangePaperTypeCommand}" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageSize.png" telerik:ScreenTip.Description="Choose a paper size for the current section." telerik:ScreenTip.Title="Page Size" Size="Large" Text="Size">
                                <telerik:RadRibbonDropDownButton.DropDownContent>
                                    <telerik:RadGallery ItemWidth="184" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=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" x 46.78")" 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" x 33.05")" 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" x 23.39")" 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" x 16.53")" 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" x 11.7")" 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" x 8.26")" 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" x 48.03")" 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" x 33.86")" 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" x 24.01")" 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" x 16.93")" 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" x 12.01")" 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" x 8.46")" 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" x 55.67")" 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" x 39.38")" 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" x 19.68")" 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" x 19.68")" 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" x 14.33")" 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" x 10.13")" 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" x 10")" 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" x 13")" 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" x 10")" 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" x 8")" 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" x 11")" 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" x 14")" 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" x 11")" 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" x 17")" 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" x 19.25")" 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" x 15")" 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" x 21")" 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" x 22")" 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" x 23")" 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" x 25")" 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" x 28")" 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" x 35")" 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" x 45")" 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" x 8.5")" 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" x 13")" 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" x 8.5")" 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" x 14")" VerticalAlignment="Center" />
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                    </telerik:RadGallery>
                                </telerik:RadRibbonDropDownButton.DropDownContent>
                            </telerik:RadRibbonDropDownButton>
                            <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding Path=ChangePageMarginsCommand}" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageMargin.png" telerik:ScreenTip.Description="Select the margin sizes for the current section." telerik:ScreenTip.Title="Margins" Size="Large" Text="Margins">
                                <telerik:RadRibbonDropDownButton.DropDownContent>
                                    <telerik:RadGallery ItemHeight="54" ItemWidth="114" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangePageMarginsCommand}" ViewportHeight="270" ViewportWidth="115">
                                        <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Normal">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/PageMarginNormal.png" Stretch="None" />
                                                <TextBlock FontWeight="Bold" Text="Normal" VerticalAlignment="Center" />
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                        <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Narrow">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/PageMarginNarrow.png" Stretch="None" />
                                                <TextBlock FontWeight="Bold" Text="Narrow" VerticalAlignment="Center" />
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                        <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Moderate">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/PageMarginModerate.png" Stretch="None" />
                                                <TextBlock FontWeight="Bold" Text="Moderate" VerticalAlignment="Center" />
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                        <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Wide">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/PageMarginWide.png" Stretch="None" />
                                                <TextBlock FontWeight="Bold" Text="Wide" VerticalAlignment="Center" />
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                        <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Office2003">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/PageMarginNormal.png" 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 Path=ChangePageOrientationCommand}" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientation.png" telerik:ScreenTip.Description="Switch the pages between portrait and landscape layouts." telerik:ScreenTip.Title="Page Orientation" Size="Large" Text="Orientation">
                                <telerik:RadRibbonDropDownButton.DropDownContent>
                                    <telerik:RadGallery ItemHeight="54" ItemWidth="109" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangePageOrientationCommand}" ViewportHeight="216" ViewportWidth="110">
                                        <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Portrait">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientationPortrait.png" Stretch="None" />
                                                <TextBlock FontWeight="Bold" Text="Portrait" VerticalAlignment="Center" />
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                        <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Rotate90">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientationLandscape.png" Stretch="None" />
                                                <TextBlock FontWeight="Bold" Text="Landscape" VerticalAlignment="Center" />
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                        <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Rotate180">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientationRotate180.png" Stretch="None" />
                                                <TextBlock FontWeight="Bold" Text="Rotate 180" VerticalAlignment="Center" />
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                        <telerik:RadGalleryItem HorizontalContentAlignment="Left" Tag="Rotate270">
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageOrientationRotate270.png" Stretch="None" />
                                                <TextBlock FontWeight="Bold" Text="Rotate 270" VerticalAlignment="Center" />
                                            </StackPanel>
                                        </telerik:RadGalleryItem>
                                    </telerik:RadGallery>
                                </telerik:RadRibbonDropDownButton.DropDownContent>
                            </telerik:RadRibbonDropDownButton>
                            <StackPanel>
                                <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding Path=InsertSectionBreakCommand}" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/Break.png" telerik:ScreenTip.Description="Add page, section, or column breaks to the document." telerik:ScreenTip.Title="Insert Page and Section Breaks" Size="Medium" Text="Breaks">
                                    <telerik:RadRibbonDropDownButton.DropDownContent>
                                        <StackPanel>
                                            <telerik:RadGroupHeader Content="Page Breaks" />
                                            <telerik:RadGallery ItemHeight="54" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=InsertPageBreakCommand}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ViewportHeight="54">
                                                <telerik:RadGalleryItem HorizontalAlignment="Stretch" HorizontalContentAlignment="Left">
                                                    <StackPanel Orientation="Horizontal">
                                                        <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageBreak.png" Stretch="None" />
                                                        <TextBlock FontWeight="Bold" Margin="8 0 0 0" Text="Page" VerticalAlignment="Center" />
                                                    </StackPanel>
                                                </telerik:RadGalleryItem>
                                            </telerik:RadGallery>
                                            <telerik:RadGroupHeader Content="Section Breaks" />
                                            <telerik:RadGallery ItemHeight="54" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=InsertSectionBreakCommand}" ScrollViewer.VerticalScrollBarVisibility="Disabled" ViewportHeight="162">
                                                <telerik:RadGalleryItem HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" Tag="NextPage">
                                                    <StackPanel Orientation="Horizontal">
                                                        <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/NextPageSectionBreak.png" 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.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/EvenPageSectionBreak.png" 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.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/OddPageSectionBreak.png" 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:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="2" Variant="Medium" />
                                <telerik:GroupVariant Priority="8" Variant="Collapsed" />
                            </telerik:RadRibbonGroup.Variants>
                            <telerik:RadRibbonButton CollapseToMedium="WhenGroupIsMedium" CollapseToSmall="WhenGroupIsSmall" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/Watermark.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowWatermarkSettingsDialogCommand}" telerik:ScreenTip.Description="Insert ghosted text behind the content on the page." telerik:ScreenTip.Title="Watermark" Size="Large" Text="Watermark" />
                        </telerik:RadRibbonGroup>
                    </telerik:RadRibbonTab>
                    <telerik:RadRibbonTab Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.View}">
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Document_Views}">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="2" Variant="Medium" />
                                <telerik:GroupVariant Priority="8" Variant="Collapsed" />
                            </telerik:RadRibbonGroup.Variants>
                            <telerik:RadRibbonButton CollapseToMedium="WhenGroupIsMedium" CollapseToSmall="WhenGroupIsSmall" CommandParameter="Flow" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/web-C.PNG" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeLayoutModeCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.View_the_document_as_it_would_look_as_a_Web_page}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Web_LayoutWeb}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Web_Layout}" />
                            <telerik:RadRibbonButton CollapseToMedium="WhenGroupIsMedium" CollapseToSmall="WhenGroupIsSmall" CommandParameter="Paged" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/PageBreak.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeLayoutModeCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.View_the_documetn_as_it_will_appear_on_the_printed_page}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Print_Layout}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Print_Layout}" />
                        </telerik:RadRibbonGroup>
                    </telerik:RadRibbonTab>
                    <telerik:RadRibbonTab Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Table}">
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Table}">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="2" Variant="Medium" />
                                <telerik:GroupVariant Priority="8" Variant="Collapsed" />
                            </telerik:RadRibbonGroup.Variants>
                            <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding Path=InsertTableCommand}" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertTable.png" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_a_table_into_the_document}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Table}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert}">
                                <telerik:RadRibbonDropDownButton.DropDownContent>
                                    <StackPanel>
                                        <telerik:RadRibbonButton ClickMode="Press">
                                            <telerik:TableSizePicker Command="{Binding Path=InsertTableCommand}" />
                                        </telerik:RadRibbonButton>
                                        <telerik:RadMenuItem IsSeparator="True" />
                                        <telerik:RadRibbonButton HorizontalAlignment="Stretch" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowInsertTableDialogCommand}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/InsertTable.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Table}" />
                                    </StackPanel>
                                </telerik:RadRibbonDropDownButton.DropDownContent>
                            </telerik:RadRibbonDropDownButton>
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/DeleteTable.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=DeleteTableCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Delete_the_entire_table}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Delete_Table}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Delete}" />
                            <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding Path=SelectTableEmptyCommand}" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/SelectTableTools.png" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Select_rows_columns_cells_or_the_entire_table}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Select_Table}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Select}">
                                <telerik:RadRibbonDropDownButton.DropDownContent>
                                    <StackPanel>
                                        <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SelectTableCellCommand}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/SelectTableCell.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Select_Cell}" />
                                        <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SelectTableColumnCommand}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/SelectTableColumn.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Select_Column}" />
                                        <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SelectTableRowCommand}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/SelectTableRow.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Select_Row}" />
                                        <telerik:RadRibbonButton telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SelectTableCommand}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/SelectTable.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Select_Table}" />
                                    </StackPanel>
                                </telerik:RadRibbonDropDownButton.DropDownContent>
                            </telerik:RadRibbonDropDownButton>
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/TableProperties.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ShowTablePropertiesDialogCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Show_the_Table_Properties_dialog_box_to_change_advanced_table_properties}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Table_Properties}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Properties}" />
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Rows}">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="2" Variant="Medium" />
                                <telerik:GroupVariant Priority="8" Variant="Collapsed" />
                            </telerik:RadRibbonGroup.Variants>
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertTableRow.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=InsertTableRowCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_a_new_row}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Row}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Row}" />
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertTableRowBelow.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=InsertTableRowBelowCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Add_a_new_row_directly_below_the_selected_row}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Rows_Below}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Below}" />
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertTableRowAbove.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=InsertTableRowAboveCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Add_a_new_row_directly_above_the_selected_row}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Rows_Above}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Above}" />
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/DeleteTableRows.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=DeleteTableRowCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Delete_the_selected_row}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Delete_Row}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Delete_Row}" />
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Columns}">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="2" Variant="Medium" />
                                <telerik:GroupVariant Priority="8" Variant="Collapsed" />
                            </telerik:RadRibbonGroup.Variants>
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertTableColumn.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=InsertTableColumnCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_a_new_column}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Column}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Column}" />
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertTableColumnToTheLeft.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=InsertTableColumnToTheLeftCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Add_a_new_column_directly_to_the_left_of_the_selected_column}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Columns_to_the_Left}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Left}" />
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/InsertTableColumnToTheRight.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=InsertTableColumnToTheRightCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Add_a_new_column_directly_to_the_right_of_the_selected_column}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Columns_to_the_Right}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Insert_Right}" />
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/DeleteTableColumns.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=DeleteTableColumnCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Delete_the_selected_column}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Delete_Column}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Delete_Column}" />
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Merge}">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="2" Variant="Medium" />
                                <telerik:GroupVariant Priority="8" Variant="Collapsed" />
                            </telerik:RadRibbonGroup.Variants>
                            <telerik:RadRibbonButton LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/MergeTableCells.png" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=MergeTableCellsCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Merge_the_selected_cells_into_one_cell}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Merge_Cells}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Merge_Cells}" />
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Cell_Size}">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="2" Variant="Medium" />
                                <telerik:GroupVariant Priority="8" Variant="Collapsed" />
                            </telerik:RadRibbonGroup.Variants>
                            <telerik:RadRibbonDropDownButton CollapseToMedium="WhenGroupIsMedium" Command="{Binding Path=SelectTableEmptyCommand}" LargeImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/32/AutoFit.png" telerik:ScreenTip.Description="Automatically_resize_the_column_widths_based_on_the_size_of_the_text_in_them_or_keep_the_widths_with_fixed_size" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.AutoFitOrFixed}" Size="Large" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.AutoFit}">
                                <telerik:RadRibbonDropDownButton.DropDownContent>
                                    <StackPanel>
                                        <telerik:RadRibbonButton CommandParameter="AutoFit" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeTableColumnsLayoutModeCommand}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/AutoFItToWindow.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.AutoFit_to_Window}" />
                                        <telerik:RadRibbonButton CommandParameter="Fixed" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=ChangeTableColumnsLayoutModeCommand}" Size="Medium" SmallImage="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/FixedColumnWidth.png" Text="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Fixed_Column_Width}" />
                                    </StackPanel>
                                </telerik:RadRibbonDropDownButton.DropDownContent>
                            </telerik:RadRibbonDropDownButton>
                        </telerik:RadRibbonGroup>
                        <telerik:RadRibbonGroup Header="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Alignment}">
                            <telerik:RadRibbonGroup.Variants>
                                <telerik:GroupVariant Priority="1" Variant="Medium" />
                                <telerik:GroupVariant Priority="3" Variant="Collapsed" />
                            </telerik:RadRibbonGroup.Variants>
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                                <telerik:RadToggleButton CommandParameter="Left,Top" CornerRadius="3" Grid.Column="0" Grid.Row="0" IsBackgroundVisible="False" IsTabStop="False" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=TableCellContentAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_text_to_the_top_left_corner_of_the_cell}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Top_Left}">
                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/LeftTopCellAlignment.png" Stretch="None" />
                                </telerik:RadToggleButton>
                                <telerik:RadToggleButton CommandParameter="Center,Top" CornerRadius="3" Grid.Column="1" Grid.Row="0" IsBackgroundVisible="False" IsTabStop="False" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=TableCellContentAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Center_text_and_align_it_to_the_top_of_the_cell}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Top_Center}">
                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/CenterTopCellAlignment.png" Stretch="None" />
                                </telerik:RadToggleButton>
                                <telerik:RadToggleButton CommandParameter="Right,Top" CornerRadius="3" Grid.Column="2" Grid.Row="0" IsBackgroundVisible="False" IsTabStop="False" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=TableCellContentAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_text_to_the_top_right_corner_of_the_cell}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Top_Right}">
                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/RightTopCellAlignment.png" Stretch="None" />
                                </telerik:RadToggleButton>
                                <telerik:RadToggleButton CommandParameter="Left,Center" CornerRadius="3" Grid.Column="0" Grid.Row="1" IsBackgroundVisible="False" IsTabStop="False" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=TableCellContentAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Center_text_vertically_and_align_it_to_the_left_side_of_the_cell}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Center_Left}">
                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/LeftMiddleCellAlignment.png" Stretch="None" />
                                </telerik:RadToggleButton>
                                <telerik:RadToggleButton CommandParameter="Center,Center" CornerRadius="3" Grid.Column="1" Grid.Row="1" IsBackgroundVisible="False" IsTabStop="False" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=TableCellContentAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Center_text_horizontally_and_vertically_within_the_cell}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Center}">
                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/CenterMiddleCellAlignment.png" Stretch="None" />
                                </telerik:RadToggleButton>
                                <telerik:RadToggleButton CommandParameter="Right,Center" CornerRadius="3" Grid.Column="2" Grid.Row="1" IsBackgroundVisible="False" IsTabStop="False" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=TableCellContentAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Center_text_vertically_and_align_it_to_the_right_side_of_the_cell}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Center_Right}">
                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/RightMiddleCellAlignment.png" Stretch="None" />
                                </telerik:RadToggleButton>
                                <telerik:RadToggleButton CommandParameter="Left,Bottom" CornerRadius="3" Grid.Column="0" Grid.Row="2" IsBackgroundVisible="False" IsTabStop="False" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=TableCellContentAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_text_to_the_bottom_left_corner_of_the_cell}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Bottom_Left}">
                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/LeftBottomCellAlignment.png" Stretch="None" />
                                </telerik:RadToggleButton>
                                <telerik:RadToggleButton CommandParameter="Center,Bottom" CornerRadius="3" Grid.Column="1" Grid.Row="2" IsBackgroundVisible="False" IsTabStop="False" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=TableCellContentAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Center_text_and_align_it_to_the_bottom_of_the_cell}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Bottom_Center}">
                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/CenterBottomCellAlignment.png" Stretch="None" />
                                </telerik:RadToggleButton>
                                <telerik:RadToggleButton CommandParameter="Right,Bottom" CornerRadius="3" Grid.Column="2" Grid.Row="2" IsBackgroundVisible="False" IsTabStop="False" telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=TableCellContentAlignmentCommand}" telerik:ScreenTip.Description="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_text_to_the_bottom_right_corner_of_the_cell}" telerik:ScreenTip.Title="{Binding Source={StaticResource LocalizedStrings}, Path=ControlStrings.Align_Bottom_Right}">
                                    <Image Source="/Telerik.Windows.Controls.RichTextBoxUI;component/Images/MSOffice/16/RightBottomCellAlignment.png" Stretch="None" />
                                </telerik:RadToggleButton>
                            </Grid>
                        </telerik:RadRibbonGroup>
                    </telerik:RadRibbonTab>
                </telerik:RadRichTextBoxRibbonUI>
                <telerik:RadRichTextBoxStatusBar AssociatedRichTextBox="{Binding ElementName=radRichTextBox1}" Grid.Row="2" />
            </Grid>
        </Grid>
    RichTextBoxChildWinStream.xaml.cs
    /// <summary>
       /// Interaction logic for RichTextBoxChildWinStream.xaml
       /// </summary>
       public partial class RichTextBoxChildWinStream
       {
           public byte[] contentString;
           public byte[] ContentString
           {
               get { return contentString; }
               set { contentString = value; }
           }
           public event EventHandler OkClicked;
           public RichTextBoxChildWinStream(byte[] content)
           {
               InitializeComponent();
               ContentString = content;
               //IDocumentFormatProvider exporter = new XamlFormatProvider();
               IDocumentFormatProvider exporter = new HtmlFormatProvider();
               this.radRichTextBox1.Document = exporter.Import(ContentString);
           }
           /// <summary>
           /// 
           /// </summary>
           /// <param name="sender"></param>
           /// <param name="e"></param>
           private void OnButtonCancelClicked(object sender, RoutedEventArgs e)
           {
               this.DialogResult = false;
               this.Close();
           }
           /// <summary>
           /// 
           /// </summary>
           /// <param name="sender"></param>
           /// <param name="e"></param>
           private void OnButtonAcceptClicked(object sender, RoutedEventArgs e)
           {
               if (OkClicked != null)
               {
                   try
                   {
                       //  IDocumentFormatProvider exporter = new XamlFormatProvider();
                       IDocumentFormatProvider exporter = new HtmlFormatProvider();
                       ContentString = exporter.Export(this.radRichTextBox1.Document);
                   }
                   catch (Exception exception)
                   {
                       string error = exception.Message;
                   }
                   OkClicked(this, new EventArgs());
               }
               this.DialogResult = true;
               this.Close();
           }

  2. Answer
    Vasil
    Admin
    Vasil avatar
    124 posts

    Posted 14 Jun 2012 Link to this post

    Hi Jiaqi,

    Thank you for contacting us about this failure. We confirmed the bug with export of Chinese characters to HTML and we will try to fix it for future release.
    Please, excuse us for the inconvenience. We have added points to your account for the suggestions. Don't hesitate to contact us if you have other questions.


    All the best,
    Vasil
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Jiaqi
    Jiaqi avatar
    6 posts
    Member since:
    Nov 2011

    Posted 14 Jun 2012 Link to this post

    Thanks for your help!
Back to Top