<Window x:Class="TextBoxSample01.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="TextBox 控件范例" Height="400" Width="525" Loaded="Window_Loaded">
    <Grid>
        <TextBox Height="25" HorizontalAlignment="Left" Margin="30,61,0,0" Name="txtCast" VerticalAlignment="Top" Width="442" CharacterCasing="Lower" Text="charactercasting = lower" FontSize="14" />
        <TextBox Height="25" HorizontalAlignment="Left" Margin="30,133,0,0" Name="txtReadOnly" VerticalAlignment="Top" Width="442" IsReadOnly="True" Text="你无法修改里面的文字" FontSize="14" />
        <Label Content="无论输入什么，都变成小写字母：" Height="25" HorizontalAlignment="Left" Margin="30,30,0,0" Name="label1" VerticalAlignment="Top" Width="442" FontSize="14" />
        <Label Content="只读的TextBox：" Height="25" HorizontalAlignment="Left" Margin="30,102,0,0" Name="label2" VerticalAlignment="Top" Width="442" FontSize="14" />
        <TextBox Height="102" HorizontalAlignment="Left" Margin="30,211,0,0" Name="txtMultiline" VerticalAlignment="Top" Width="442" TextWrapping="WrapWithOverflow" VerticalScrollBarVisibility="Disabled" AcceptsReturn="True" FontSize="14" />
        <Label Content="多行的TextBox：" FontSize="14" Height="25" HorizontalAlignment="Left" Margin="30,180,0,0" Name="label3" VerticalAlignment="Top" Width="442" />
    </Grid>
</Window>
