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>