<Window x:Class="WPF控件_14_PasswordBox.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 Margin="3" Name="ClearButton" Click="ClearButton_OnClick">清除密码</Button>
            <Button Margin="3" Name="PasteButton" Click="PasteButton_OnClick">粘贴</Button>
            <Button Margin="3" Name="SelectAllButton" Click="SelectAllButton_OnClick">选择全部</Button>
        </StackPanel>
        <PasswordBox Height="30" Name="PasswordBox" MaxLength="30" Password="这个是密码"
                     PasswordChanged="PasswordBox_OnPasswordChanged" />
    </StackPanel>
</Window>