<Window x:Class="MenuSample.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" FontSize="14">
    <DockPanel Name="dockPanel1">
        <Menu Height="22" Name="menu1" DockPanel.Dock="Top" VerticalAlignment="Top">
            <MenuItem Header="_File">
                <MenuItem Header="_New" Name="miNew" Click="miNew_Click">
                    <MenuItem.Icon>
                        <Image Source="/MenuSample;component/Images/Generic_Document.ico" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Open" Name="miOpen" Click="miOpen_Click" ToolTip="打开旧文档" IsCheckable="False">
                    <MenuItem.Icon>
                        <Image Source="/MenuSample;component/Images/folder_open.ico" />
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>
        </Menu>
    </DockPanel>
</Window>
