1

简而言之,我需要提供一个功能区 QuickAccessToolbar 而不显示功能区。这很容易实现,但对我来说一个很大的问题是工具栏项目上的标签不可见。这是我的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>

RibbonMenuItem我下拉 时RibbonSplitButton,标题可见,但其标题不可见,Save按钮也不可见。我究竟做错了什么?

4

1 回答 1

1

您必须将功能区控件放置在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>
于 2013-12-12T01:00:52.093 回答