Michael Smit
Michael Smit

Reputation: 51

Microsoft WPF Ribbon - Group buttons as drop down buttons

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.

Upvotes: 1

Views: 5858

Answers (3)

Sheridan
Sheridan

Reputation: 69985

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.

Upvotes: 1

Aaron McIver
Aaron McIver

Reputation: 24723

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>

Upvotes: 4

madd0
madd0

Reputation: 9323

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.

Upvotes: 2

Related Questions