Reputation: 1503
I want to display the menuitems to the right side of the Main menu. Currently its displayed to the left.
<Menu Name="menu1" Width="800" Margin="0,0,0,670">
<MenuItem Header="File">
<MenuItem Header="Open"/>
<MenuItem Header="Close"/>
</MenuItem>
<MenuItem Header="Edit"/>
</Menu>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="MinHeight" Value="30" />
<Setter Property="MinWidth" Value="100"/>
<Setter Property="HeaderTemplate">
<Setter.Value>
<DataTemplate>
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" Content="{Binding}" />
</DataTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="Yellow" />
<Setter Property="BorderBrush" Value="Black" />
<Setter Property="BorderThickness" Value="1" />
</Style>
Upvotes: 2
Views: 3576
Reputation: 333
It seems to be a configuration problem with your local windows machine (check if this behavior appears in other programs too). If yes, you have two possibilities to fix this:
Choice 1
Your menus should open left-aligned.
Choice 2
Upvotes: 14