Menu Height in Application Menu

Ribbon for WPF Forum

Posted 15 years ago by David Mullin
Avatar
I have an Application Menu defined as follows:
<ribbon:Ribbon.ApplicationMenu>
    <ribbon:ApplicationMenu >

        <ribbon:SplitButton ImageSourceLarge="{DynamicResource {x:Static ct:Common.HelpImageKey}}" Label="Help" KeyTipAccessText="U" Command="ApplicationCommands.Help">
            <ribbon:Menu ItemVariantSize="Medium" >
                <ribbon:Separator Label="Help" />
                <ribbon:Button Label="About CaseTrakker Dynamo" Click="AboutButton_Click" />
            </ribbon:Menu>
        </ribbon:SplitButton>

        <ribbon:ApplicationMenu.AdditionalContent>
            <ribbon:RecentDocumentMenu Label="Recent Items">
                <shared:RecentDocumentManager x:Name="RecentDocuments"/>
            </ribbon:RecentDocumentMenu>
        </ribbon:ApplicationMenu.AdditionalContent>

        <ribbon:ApplicationMenu.FooterButtons>
            <ribbon:Button ImageSourceSmall="{DynamicResource {x:Static ct:Common.CancelImageKey}}" Label="Exit CaseTrakker Dynamo"  KeyTipAccessText="X" Command="ApplicationCommands.Close"/>
        </ribbon:ApplicationMenu.FooterButtons>

    </ribbon:ApplicationMenu>
</ribbon:Ribbon.ApplicationMenu>
The issue that I am having is that the height of the popup menu from the Help button is set by the height of the Application Menu as a whole. This gives me two issues:

1) Since there is nothing else in the Application Menu, it is very short, which means that there isn't roomto show the popup menu. The visual effect is very unpleasing

2) If I add other things to the Application Menu, then it is tall enough to show the complete popup, but then the popup ends up being much taller than it needs to be - which is again visually unpleasing.

Am I missing a setting somewhere?

David Mullin
IMA Technologies

[Modified at 02/13/2009 07:02 PM]

Comments (4)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi David,

1) I'd recommend you set the MinHeight property on the ribbon:ApplicationMenu control. This ensures that the app menu remains at least a minimum height.

2) You should never assign a lot of top-level app menu items or really tall additional content. The tallest you want the app menu to be is probably around 500-ish pixels for usability reasons. So make sure the number of top-level menu items you assign doesn't extend beyond that. And if you have additional content that would be larger than that, maybe put a ScrollViewer on it. If you are using the recent document manager, limit the number of recent documents displayed like we do in our main Features demo.

Hope that helps.


Actipro Software Support

Posted 15 years ago by David Mullin
Avatar
The MinHeight property solve my first issue - thanks!

I apparently miscommunicated what my second issue is. If, for instance, my top-level menu has 4 items in it (and is thus shorter than your recommended maximum), and I have a fly-out with 1 item in it, then, my flyout is very tall - tall enough for 3-4 items, even though it only has one item in it.

What I was trying to find out was how to make the flyout only as big as is needed for the items in it, rather than as big as the Application Menu as a whole?

David Mullin
IMA Technologies
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi David,

Oh I see now. Actually that was done by design because the Microsoft Ribbon UI specifications state that the root menu item popups must cover the additional content area exactly and not be any taller or shorter. So in that regard, we implemented it to conform to the requirements as specified by Microsoft.


Actipro Software Support

Posted 15 years ago by David Mullin
Avatar
That makes sense. Thanks for getting back to me.

David Mullin
The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.