<Window x:Class="WPF控件_13_TextBox.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"
        Title="MainWindow" Height="450" Width="800">
    <StackPanel>
        <StackPanel Orientation="Horizontal">
            <Button Name="UndoButton" Content="撤销" Click="UndoButton_OnClick" />
        </StackPanel>
        <TextBox Name="TextBox" TextWrapping="Wrap" AcceptsReturn="True" AutoWordSelection="True" IsUndoEnabled="True"
                 SpellCheck.IsEnabled="True" Loaded="TextBox_OnLoaded" />
    </StackPanel>
</Window>