<Window x:Class="MyNotepad.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="我的记事本" Height="300" Width="300" FontSize="14" Loaded="Window_Loaded">
    <DockPanel Name="dpMain">
        <Menu Height="23" Name="menuMain" VerticalAlignment="Top" DockPanel.Dock="Top">
            <MenuItem Header="文件 (_F)">
                <MenuItem Header="新建 (_N)" ToolTip="建立新的文件编辑环境" Name="miNew" Click="miNew_Click" Command="ApplicationCommands.New" />
                <MenuItem Header="打开 (_O)" ToolTip="打开并编辑已有的文件" Name="miOpen" Click="miOpen_Click" Command="ApplicationCommands.Open" CommandTarget="{Binding ElementName=txtEditor}" />
                <MenuItem Header="保存 (_S)" ToolTip="保存编辑中的数据" Name="miSave" Click="miSave_Click" Command="ApplicationCommands.Save" />
                <Separator />
                <MenuItem Header="退出 (_X)" ToolTip="关闭我的记事本" Name="miExit" Click="miExit_Click" Command="ApplicationCommands.Close" />
            </MenuItem>
            <MenuItem Header="格式 (_O)" Name="miFormat">
                <MenuItem Header="字体 (_F)" Name="miFont">
                    <MenuItem Header="特大" Name="miBiggest" Checked="miBiggest_Checked" IsCheckable="True" />
                    <MenuItem Header="大" Name="miBig" IsCheckable="True" Checked="miBig_Checked" />
                    <MenuItem Header="正常" Name="miNormal" IsCheckable="True" Checked="miNormal_Checked" />
                    <MenuItem Header="小" Name="miSmall" IsCheckable="True" Checked="miSmall_Checked" />
                    <MenuItem Header="最小" Name="miSmallest" IsCheckable="True" Checked="miSmallest_Checked" />
                </MenuItem>
            </MenuItem>
        </Menu>
        <TextBox Name="txtEditor" DockPanel.Dock="Top" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" />
    </DockPanel>
</Window>
