WPF的Textbox 并没有password样式,可以手动更改
<TextBox Width="200" Margin="10,0,0,0" Text="{Binding appData.CurrentUser.LoginPwd}" Background="Transparent">
<TextBox.Style>
<Style TargetType="{x:Type TextBox}"> <Setter Property="TextDecorations"> <Setter.Value> <TextDecorationCollection> <TextDecoration> <TextDecoration.Pen> <Pen Brush="Black" DashCap="Round" EndLineCap="Round" StartLineCap="Round" Thickness="10"> <Pen.DashStyle> <DashStyle Dashes="0.0,1.2" Offset="0.6" /> </Pen.DashStyle> </Pen> </TextDecoration.Pen> <TextDecoration.Location> <TextDecorationLocation>Strikethrough</TextDecorationLocation> </TextDecoration.Location> </TextDecoration> </TextDecorationCollection> </Setter.Value> </Setter> <Setter Property="Height" Value="30" /> <Setter Property="Background" Value="#FF484D5E" /> <Setter Property="Foreground" Value="Transparent" /> <Setter Property="FontSize" Value="20" /> <Setter Property="FontFamily" Value="Courier New" /> </Style>
</TextBox.Style>
</TextBox>
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/161458.html原文链接:https://javaforall.cn
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有