所以,我可以使用你的帮助将MaxLength =“10”应用于此watermarkpasswordbox
<watermarkControls:WatermarkPasswordBox
x:Name="passwordLoginTextBox"
WatermarkText="{Binding Path=LocalizedResources.PasswordWatermark,
Source={StaticResource LocalizedStrings}}" />
答案 0 :(得分:0)
只需在代码隐藏文件中添加以下内容:
passwordLoginTextBox.MaxLength = 10;