WPF功能区控件:RibbonContextualTabGroup隐藏标题

时间:2010-01-06 20:33:50

标签: .net wpf ribbon

我正在创建一个使用Microsoft功能区的应用程序,但我遇到了RibbonContextualTabGroup的问题。出现此选项卡时,它会将功能区属性中指定的标题文本更改为“E .....”,有没有办法解决此问题?

alt text

这是我的代码:

<r:RibbonWindow x:Class="Sample.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
    Title="Example Ribbon" Height="600" Width="800" FontFamily="Arial" WindowStartupLocation="CenterScreen" 
            Background="White">

<r:Ribbon DockPanel.Dock="Top" Title="Example" >
    <r:Ribbon.ContextualTabGroups>
        <r:RibbonContextualTabGroup Color="Yellow" Width="120" Name="ribbonCtxGroup" Label="Dataset">
            <r:RibbonTab Name="ribbonTabDataset" Label="Dataset">
                <r:RibbonTab.Groups>

                    <r:RibbonGroup >
                        <r:RibbonGroup.Command>
                            <r:RibbonCommand LabelTitle="Pages" />
                        </r:RibbonGroup.Command>
                    </r:RibbonGroup>

                </r:RibbonTab.Groups>
            </r:RibbonTab>
        </r:RibbonContextualTabGroup>
    </r:Ribbon.ContextualTabGroups>
</r:Ribbon>

1 个答案:

答案 0 :(得分:0)

如果您还没有尝试过(或者不需要),请尝试从r:RibbonWindow中的r:Ribbon或Title =“Example Ribbon”中删除Title =“Example”。