Microsoft WPF Ribbon - 将按钮分组为下拉按钮

发布于 2024-10-20 06:36:10 字数 319 浏览 4 评论 0原文

我已经在 WPF 浏览器 .NET 应用程序中实现了 Microsoft WPF Ribbon。 这是一个非常简单的布局,包含选项卡、组和组中的按钮。然而,有很多组和按钮,用户在较小的显示器上使用功能区时遇到困难。有些小组将按钮转换为没有用户不喜欢的文本的小图像按钮。他们必须将鼠标悬停在每个按钮上才能查看其用途。 其他组完全崩溃并改为下拉按钮。他们希望以此作为标准。默认情况下,每个组都表示为下拉按钮,单击它时,项目列表将显示为菜单项。

要了解我想要什么,您可以简单地减小窗口大小,直到组折叠成带有菜单项的下拉效果。

有人可以帮忙吗?

按钮与选项卡和组一样动态绑定到功能区。

I have implemented the Microsoft WPF Ribbon in a WPF browser .NET application.
It is a pretty simply layout with tabs, groups and buttons in the groups. There are however a LOT of groups and buttons and users are having a tough time using the Ribbon on smaller displays. Some of the groups convert the buttons to small image buttons with no text which the users don't like. They have to hover over each button to see it's purpose.
Other groups collapse completely and change to drop down buttons. This they want as standard. Each group to be represented as a drop down button by default and when clicking on it a list of the items as menu items.

To get an idea of what I am after, you can simply reduce the window size until the groups collapse to this drop down effect with menu items.

Can someone help?

The buttons are bound to the ribbon dynamically as are the tabs and groups.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

榆西 2024-10-27 06:36:10

RibbonMenuButton 不够用是否有原因?

    <r:RibbonMenuButton
        Label="Clicking"
        SmallImageSource=".."
        LargeImageSource="..">
            <r:RibbonMenuItem 
                Header="Click Me 1"
                ImageSource=".."/>
            <r:RibbonMenuItem 
                Header="Click Me 2"
                ImageSource=".."/>
            <r:RibbonMenuItem 
                Header="Click Me 3"
                ImageSource=".."/>
            <r:RibbonMenuItem 
                Header="Click Me 4"
                ImageSource=".."/>
    </r:RibbonMenuButton>

Is there a reason the RibbonMenuButton doesn't suffice?

    <r:RibbonMenuButton
        Label="Clicking"
        SmallImageSource=".."
        LargeImageSource="..">
            <r:RibbonMenuItem 
                Header="Click Me 1"
                ImageSource=".."/>
            <r:RibbonMenuItem 
                Header="Click Me 2"
                ImageSource=".."/>
            <r:RibbonMenuItem 
                Header="Click Me 3"
                ImageSource=".."/>
            <r:RibbonMenuItem 
                Header="Click Me 4"
                ImageSource=".."/>
    </r:RibbonMenuButton>
夜声 2024-10-27 06:36:10

我认为你的问题可能不是技术性的,而是概念性的。

如果您查看Microsoft 关于功能区的指南,您会注意到如果您有太多命令,那么功能区不一定是最佳选择:

命令数量是否较多?使用功能区是否需要七个以上的核心标签?用户是否需要经常更改选项卡来执行常见任务?如果是这样,请使用工具栏(不需要更改选项卡)和调色板窗口(可能需要更改选项卡,但一次可以打开多个选项卡)可能是一个更有效的选择。

也许您应该考虑将命令组拆分到多个选项卡上,对它们进行逻辑分组,以便经常一起发生的操作保持在一起,而很少一起发生的操作则位于单独的选项卡上。例如,更改页面大小和边距将保留在一起,而更改字体大小将在单独的选项卡上进行。

您还可以考虑使用仅在某些条件下才会出现的上下文选项卡,因此只会显示与用户当前正在执行的操作相关的命令。

I think your problem might not be technical, but rather conceptual.

If you take a look at Microsoft's guidelines on ribbons, you'll notice that ribbons are not necessarily the best choice if you have too many commands:

Is there a large number of commands? Would using a ribbon require more than seven core tabs? Would users constantly have to change tabs to perform common tasks? If so, using toolbars (which don't require changing tabs) and palette windows (which may require changing tabs, but there can be several open at a time) might be a more efficient choice.

Maybe you should consider splitting your command groups on several tabs, grouping them logically so that actions that take place together often remain together, while actions that seldom take place together are on separate tabs. For example, changing page size and margins would remain together, while changing font size would go on a separate tab.

You can also consider using contextual tabs that will only appear under certain conditions, and therefore will only show commands related to what the user is doing at the moment.

樱&纷飞 2024-10-27 06:36:10

You can control which buttons are displayed in a RibbonBar when they have been resized (internally by the bar). You can use the RibbonGroup.GroupSizeDefinitions and RibbonTab.GroupSizeReductionOrder properties to define how each RibbonGroup should be displayed. See this Ribbon Layout and Resizing page on MSDN for more information.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文