回复 悠小蛤 :
<Window x:Class="test.MainWindow"
xmlns="
http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="
http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="
http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="
http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:test"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525" WindowState="Maximized">
<Grid>
<Grid Margin="0" Width="517" HorizontalAlignment="Left" VerticalAlignment="Top" >
<Grid.RowDefinitions>
<RowDefinition Height="5*"/>
<RowDefinition Height="27*"/>
</Grid.RowDefinitions>
<DockPanel Margin="0" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Top" />
<Grid Grid.Row="0">
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" >
<Menu x:Name="menu" FontWeight="Bold" Background="Black" Foreground="White" Width="530" HorizontalAlignment="Left" VerticalAlignment="Top">
<MenuItem Header="文件" Height="30" FontSize="20" Width="67" >
<MenuItem Header="niaho" HorizontalAlignment="Left" Width="194" Foreground="Black" Click="MenuItem_Click_1" />
<MenuItem Header="打开" HorizontalAlignment="Left" Width="194" Foreground="Black" Click="MenuItem_Click_2" />
</MenuItem>
<MenuItem Header="结果" Height="30" FontSize="20" Width="67" >
<MenuItem Header="查看" HorizontalAlignment="Left" Width="194" Foreground="Black" Click="MenuItem_Click"/>
</MenuItem>
<MenuItem Header="备注" Height="30" FontSize="20" Width="67" />
<MenuItem Header="帮助" Height="30" FontSize="20" Width="67" />
</Menu>
</StackPanel>
</Grid>
</Grid>
<Label x:Name="label" Content="" HorizontalAlignment="Left" VerticalAlignment="Top" Width="126" BorderThickness="20"/>
</Grid>
</Window>