2011-11-20 22 views
0

我正在使用telerik RadRichTextBox控件和RadRichTextBoxRibbonUI爲我的用戶提供一些新建,打開和另存爲按鈕。在我的另存爲中,我看不到docx,pdf或html的另存爲類型選項。我只得到xaml。我想我在我的項目中缺少一些裝配參考,但我無法弄清楚哪一個。這裏有一些代碼。Telerik RadRichTextBox不顯示所有另存爲文件類型

<UserControl x:Class="WpfControlLibrary1.MyView" 
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
     xmlns:iy="http://schemas.microsoft.com/expression/2010/interactivity" 
     xmlns:is="http://schemas.microsoft.com/expression/2010/interactions" 
     xmlns:prism="http://www.codeplex.com/prism" 
     xmlns:local="clr-namespace:WpfControlLibrary1" 
      xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
      xmlns:telerikXaml="clr-namespace:Telerik.Windows.Documents.FormatProviders.Xaml;assembly=Telerik.Windows.Documents.FormatProviders.Xaml" 
      xmlns:telerikPdf="clr-namespace:Telerik.Windows.Documents.FormatProviders.Pdf;assembly=Telerik.Windows.Documents.FormatProviders.Pdf" 
      mc:Ignorable="d" 
     d:DesignHeight="300" d:DesignWidth="800"> 
<UserControl.Resources>   
    <ResourceDictionary> 
     <DataTemplate x:Key="PopupWindow"> 
      <Grid Width="250" Height="200"> 
       <TextBlock Text="Hello"></TextBlock> 
      </Grid> 
     </DataTemplate> 
     <ResourceDictionary.MergedDictionaries> 
      <ResourceDictionary Source="Dictionary1.xaml"/> 
     </ResourceDictionary.MergedDictionaries> 
    </ResourceDictionary> 
</UserControl.Resources> 
<Grid x:Name="Layout"> 
    <Grid.RowDefinitions> 
     <RowDefinition Height="Auto"></RowDefinition> 
     <RowDefinition Height="*"></RowDefinition> 
     <RowDefinition Height="Auto"></RowDefinition> 
    </Grid.RowDefinitions> 

    <telerik:RadRichTextBoxRibbonUI 
      ApplicationName="Test Rich Textbox" 
      DataContext="{Binding Path=Commands, ElementName=radRich}" 
      Name="radRichTextBoxRibbonUI" 
      BackstageClippingElement="{Binding ElementName=Layout}"> 
     <telerik:RadRichTextBoxRibbonUI.Backstage> 
      <telerik:RadRibbonBackstage> 
       <telerik:RadRibbonBackstageItem Header="New" 
                IsSelectable="False" 
                telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=NewDocumentCommand}"></telerik:RadRibbonBackstageItem> 
       <telerik:RadRibbonBackstageItem Header="Open" 
                IsSelectable="False" 
                telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=OpenDocumentCommand}"></telerik:RadRibbonBackstageItem> 
       <telerik:RadRibbonBackstageItem Header="Save" 
                IsSelectable="False" 
                telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SaveCommand}"></telerik:RadRibbonBackstageItem> 
       <telerik:RadRibbonBackstageItem Header="Save As" 
                IsDefault="False"> 
        <StackPanel HorizontalAlignment="Stretch" Margin="20,20,0,0"> 
         <TextBlock Text="Save As"></TextBlock> 
         <Rectangle HorizontalAlignment="Left" Width="410"></Rectangle> 
         <StackPanel Margin="0,30,0,0" Orientation="Horizontal"> 
          <telerik:RadRibbonButton BorderBrush="Gray" 
                CornerRadius="3" 
                Height="80" 
                Width="90" 
                CommandParameter="docx"      
                telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SaveCommand}"> 
           <StackPanel Width="90"> 
            <Image HorizontalAlignment="Center"></Image> 
           </StackPanel> 
          </telerik:RadRibbonButton> 
          <StackPanel Margin="20,0,0,0"> 
           <TextBlock Text="Word Document"/> 
           <TextBlock 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" 
                CornerRadius="3" 
                Height="80" 
                Width="90" 
                CommandParameter="pdf"      
                telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SaveCommand}"> 
           <StackPanel Width="90"> 
            <Image HorizontalAlignment="Center"></Image> 
           </StackPanel> 
          </telerik:RadRibbonButton> 
          <StackPanel Margin="20,0,0,0"> 
           <TextBlock Text="Pdf Document"/> 
           <TextBlock Text="Save the file as a Pdf document." 
              TextWrapping="Wrap" 
              Width="300"/> 
          </StackPanel> 
         </StackPanel> 
         <StackPanel Margin="0,30,0,0" Orientation="Horizontal"> 
          <telerik:RadRibbonButton BorderBrush="Gray" 
                CornerRadius="3" 
                Height="80" 
                Width="90" 
                CommandParameter="xaml"      
                telerik:RadRichTextBoxRibbonUI.RichTextCommand="{Binding Path=SaveCommand}"> 
           <StackPanel Width="90"> 
            <Image HorizontalAlignment="Center"></Image> 
           </StackPanel> 
          </telerik:RadRibbonButton> 
          <StackPanel Margin="20,0,0,0"> 
           <TextBlock Text="Xaml Document"/> 
           <TextBlock Text="Save the file as a Xaml document." 
              TextWrapping="Wrap" 
              Width="300"/> 
          </StackPanel> 
         </StackPanel> 
        </StackPanel> 
       </telerik:RadRibbonBackstageItem> 
      </telerik:RadRibbonBackstage> 
     </telerik:RadRichTextBoxRibbonUI.Backstage> 
    </telerik:RadRichTextBoxRibbonUI> 

    <telerik:RadRichTextBox x:Name="radRich" Grid.Row="1"> 
    </telerik:RadRichTextBox> 
</Grid> 

回答

0

這是我的錯誤,我沒有包括Telerik的refernces入殼項目。