[英]Why are labels not showing in my QuickAccessToolbar?
In a nutshell, I need to provide a ribbon QuickAccessToolbar without the ribbon being visible. 简而言之,我需要提供一个功能区QuickAccessToolbar,而该功能区不可见。 This is quite easily achieved, but a great problem for me is that the labels on the toolbar items are not visible.
这是很容易实现的,但是对我来说,一个大问题是工具栏项上的标签不可见。 Here is my
Ribbon
: 这是我的
Ribbon
:
<Ribbon x:Name="ShellRibbon" Grid.Row="0" IsMinimized="True">
<Ribbon.QuickAccessToolBar>
<RibbonQuickAccessToolBar>
<RibbonSplitButton x:Name ="Save" Label="Save" />
<RibbonSplitButton Label="Employee Access" LabelPosition="Header" >
<RibbonMenuItem Header="Undo action #1" />
<RibbonMenuItem Header="Undo action #2" />
<RibbonMenuItem Header="Undo action #3" />
</RibbonSplitButton>
</RibbonQuickAccessToolBar>
</Ribbon.QuickAccessToolBar>
<RibbonTab>
<RibbonButton Label="One"></RibbonButton>
</RibbonTab>
<RibbonTab></RibbonTab>
</Ribbon>
The RibbonMenuItem
headers are visible when I drop down the RibbonSplitButton
, but its header isn't visible, and neither that of the Save
button. 当我下拉
RibbonSplitButton
, RibbonMenuItem
标头可见,但其标头不可见,并且“ Save
按钮的标头均不可见。 What am I doing wrong? 我究竟做错了什么?
You have to place your ribbon controls inside a DockPanel
: 您必须将功能区控件放置在
DockPanel
:
<Ribbon.QuickAccessToolBar>
<RibbonQuickAccessToolBar>
<DockPanel>
<RibbonSplitButton x:Name ="Save" Label="Save" />
<RibbonSplitButton Label="Employee Access" LabelPosition="Header" >
<RibbonMenuItem Header="Undo action #1" />
<RibbonMenuItem Header="Undo action #2" />
<RibbonMenuItem Header="Undo action #3" />
</RibbonSplitButton>
</DockPanel>
</RibbonQuickAccessToolBar>
</Ribbon.QuickAccessToolBar>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.