如何在密码框中设置文本框中的字符或如何设置绑定密码框?
<TextBox Text="{Binding PasswordAdmin, Mode=TwoWay}" Grid.Row="5" Grid.Column="1" Style="{DynamicResource LTB.TextBox}"/>
答案 0 :(得分:2)
使用控件PasswordBox:
<PasswordBox x:Name="passwordBox" Grid.Row="5" Grid.Column="1" />
这里有一些有用的链接:
http://www.wpftutorial.net/PasswordBox.html
https://msdn.microsoft.com/en-us/library/system.windows.controls.passwordbox(v=vs.100).aspx
有关绑定密码风险的链接: http://gigi.nullneuron.net/gigilabs/security-risk-in-binding-wpf-passwordbox-password/