2011-07-30 29 views
1

我試圖複製寫字板應用程序菜單並向RibbonApplicationMenu添加標題。但標題從不顯示。我在哪兒寫字板這個頭添加到應用程序菜單(如標題顯示「最近的文檔」如何將標題添加到MS Ribbon的應用程序菜單

enter image description here

<ribbon:RibbonApplicationSplitMenuItem Header="Select an Option to export" ImageSource="image1.png" > 
    <ribbon:RibbonApplicationMenuItem Header="PDF" ImageSource="image2.png" /> 
    <ribbon:RibbonApplicationMenuItem Header="Excel" ImageSource="image3.png /> 
</ribbon:RibbonApplicationSplitMenuItem> 

回答

2

試試這個

<Ribbon:Ribbon Grid.Row="0"> 
      <Ribbon:Ribbon.ApplicationMenu> 
       <Ribbon:RibbonApplicationMenu> 
        <Ribbon:RibbonApplicationMenu.AuxiliaryPaneContent> 
         <Grid MinHeight="500"> 
          <Grid.RowDefinitions> 
           <RowDefinition Height="30"/> 
           <RowDefinition Height="*"/> 
          </Grid.RowDefinitions> 
          <Border Grid.Row="0" BorderBrush="DarkBlue" BorderThickness="0,0,0,1"> 
           <StackPanel 
             Orientation="Vertical"> 
            <Label Foreground="DarkBlue" HorizontalAlignment="Left" VerticalAlignment="Center" HorizontalContentAlignment="Left" 
             VerticalContentAlignment="Center" Content="Hello World" /> 
           </StackPanel> 
          </Border> 
          <ListBox Grid.Row="1"> 
           <ListBoxItem>List Box Item 1</ListBoxItem> 
           <ListBoxItem>List Box Item 2</ListBoxItem> 
           <ListBoxItem>List Box Item 3</ListBoxItem> 
           <ListBoxItem>List Box Item 4</ListBoxItem> 
          </ListBox> 
         </Grid> 
        </Ribbon:RibbonApplicationMenu.AuxiliaryPaneContent> 
        <Ribbon:RibbonApplicationMenuItem Header="Hello _Ribbon" ImageSource="Images\LargeIcon.png"/> 
        <Ribbon:RibbonApplicationMenuItem Header="Hello _Ribbon" ImageSource="Images\LargeIcon.png"/> 
        <Ribbon:RibbonApplicationMenuItem Header="Hello _Ribbon" ImageSource="Images\LargeIcon.png"/> 
       </Ribbon:RibbonApplicationMenu> 

      </Ribbon:Ribbon.ApplicationMenu> 


     </Ribbon:Ribbon> 

它給了我這個

enter image description here

相關問題