<Window x:Class="_3_WPF命令6_复制粘贴示例.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"
        mc:Ignorable="d"
        Icon="public/003540AH4M72.jpg" Title="_3_WPF命令6_复制粘贴示例" Height="450" Width="800">
    <Window.CommandBindings>
        <CommandBinding Command="New" Executed="CommandBinding_OnExecuted" />
        <CommandBinding Command="Cut" Executed="CommandBindingCut_OnExecuted" />
        <CommandBinding Command="Copy" Executed="CommandBindingCopy_OnExecuted" />
        <CommandBinding Command="Paste" Executed="CommandBindingPast_OnExecuted" />
    </Window.CommandBindings>
    <StackPanel>
        <Menu>
            <MenuItem Header="文件">
                <MenuItem Command="New" />
            </MenuItem>

            <MenuItem Header="编辑">
                <MenuItem Command="Cut" />
                <MenuItem Command="Copy" />
                <MenuItem Command="Paste" />
            </MenuItem>
        </Menu>

        <TextBox Height="300" Name="TestTextBox" TextWrapping="Wrap" AcceptsReturn="True" AcceptsTab="True"
                 BorderBrush="PaleVioletRed" BorderThickness="5" />
    </StackPanel>
</Window>