I have a simple Menu in a DockPanel. Here is the XAML:
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<DockPanel>
<Menu DockPanel.Dock="Top">
<MenuItem Name="file" Header="_File">
<MenuItem Name="exitMenuItem" Header="E_xit"/>
</MenuItem>
</Menu>
<Grid>
</Grid>
</DockPanel>
Why does the Menu drop down to the left instead of the right of the window border like most applications?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…