<Window x:Class="PasswordBoxSample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="PasswordBox控件范例" Height="207" Width="406" FontSize="14">
    <Grid>
        <Label Content="请输入密码：" Height="28" HorizontalAlignment="Left" Margin="43,34,0,0" Name="label1" VerticalAlignment="Top" />
        <Button Content="显示密码" Height="31" HorizontalAlignment="Left" Margin="143,83,0,0" Name="button1" VerticalAlignment="Top" Width="195" Click="button1_Click" />
        <PasswordBox Height="28" HorizontalAlignment="Left" Margin="143,34,0,0" Name="password" VerticalAlignment="Top" Width="195" MaxLength="8" />
    </Grid>
</Window>
