如何将标题添加到MS Ribbon的“应用程序"菜单 [英] How to add header to MS Ribbon's Application Menu

查看:78
本文介绍了如何将标题添加到MS Ribbon的“应用程序"菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试复制写字板应用程序菜单,并将标题添加到RibbonApplicationMenu.但是标题永远不会显示.我应该在何处将此标头添加到应用程序菜单"中(例如,在写字板中,标头显示最近的文档"

I am trying to replicate WordPad Application Menu and add a header to the RibbonApplicationMenu. But the header never show. Where do I add this header to the Application Menu (e.g. in WordPad, header shows "Recent Document"

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

推荐答案

尝试一下

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

这给了我

这篇关于如何将标题添加到MS Ribbon的“应用程序"菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆