<!-- PasswordBox控件的主要用途就是用来接收输入的密码。当用户在PasswordBox控件中输入文本时,只显示表示文本的密码字符串。 PasswordBox的重要属性: Password——控件中输入的密码的实际字符串。 PasswordChar——用来设置显示在密码编辑框中的密码掩码字符。 --> <Grid x:Name="LayoutRoot" Background="White"> <StackPanel x:Name="stackPanel" Background="White"> <TextBlock Margin="10,5,0" Text="文本显示和编辑控件——PasswordBox" FontSize="18" FontWeight="Bold" Foreground="#ffbe4d4d"/> <TextBlock Margin="10,10,0" Text="密码文本框,是用密码字符*"/> <PasswordBox Name="passwordBox1" Password="Hello SiliverLight" PasswordChar="*" HorizontalAlignment="Left" Width="300" Margin="10,0"/> <TextBlock Name="tbPassWordBox1Value" HorizontalAlignment="Left" Width="300" Margin="10,0"/> <TextBlock Margin="10,0" Text="自定义风格的密码框:"/> <PasswordBox Name="passwordBox2" Password="Hello SilveLight" HorizontalAlignment="Left" Width="300" Margin="10,0"> <PasswordBox.SelectionBackground> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <GradientStop Color="Gray" Offset="0.0"/> <GradientStop Color="Black" Offset="1.0"/> </LinearGradientBrush> </PasswordBox.SelectionBackground> </PasswordBox> </StackPanel> </Grid>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。