1

我正在尝试复制写字板应用程序菜单并将标题添加到 RibbonApplicationMenu。但标题从未显示。我在哪里将此标题添加到应用程序菜单(例如在写字板中,标题显示“最近的文档”

在此处输入图像描述

<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>
4

1 回答 1

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>

它给了我这个

在此处输入图像描述

于 2011-07-30T08:53:49.360 回答