I'm using WPF 4's (in .NET 4) ribbon control, version 3.5.40729.1, in my application. (Edit: I also tested the newly released version 4.0.0.11019 to no avail.) The application menu and all sub-menu popups align as far left as possible, usually far outside the ribbon window. The expected location is that the application menu's left edge aligns with the ribbon window's left edge, and that sub-menu popups will align with the left edge of the right (usually recent items) content pane.
Here's an example screen shot illustrating the issue I'm having. Note that the left edge of this screen shot is the left edge of my monitor.
Here's a snippet of code showing the XAML of the RibbonWindow
root element and the beginning of the ribbon declaration (Although this issue occurs even for a new Ribbon Window project):
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <!-- ribbon goes here -->
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<r:Ribbon Grid.Row="0">
<r:Ribbon.ApplicationMenu>
<r:RibbonApplicationMenu SmallImageSource="Resources/ribbon app menu.png"
KeyTip="M">
<r:RibbonApplicationMenuItem Header="New project" .../>
I was originally using a DockPanel and putting my ribbon in DockPanel.Dock = "Top"
, but based on a similar question (see below), I tested a Grid. However, nothing changed. Also, this is not an issue with left-to-right or right-to-left flow of the ribbon. I also just quickly checked the sample code, but it doesn't look like any magic properties are being set there to make the ribbon function correctly.
Is this a bug, or am I doing something wrong?
Can anyone reproduce this odd behavior?
Thanks you.
This is a similar issue to a question posted at http://stackoverflow.com/questions/1492400/wpf-ribbon-applicationmenu-alignment-on-the-right , however this question was asked about the older office-like ribbon, and the screen shot link posted there is no longer working, so I can't confirm 100% that the issue is the same as mine.