Files
HandyControl/doc/source/handycontrol/attach/passwordBoxAttach/index.md
T

1.3 KiB

title
title
PasswordBoxAttach密码框专用

属性

该部分附加属性,仅仅适用于HandyControl自定义控件hc:PasswordBox以及部分HandyControl自带的PasswordBox的样式

名称 用途
IsMonitoring 是否监测
PasswordLength 密码长度

案例

对应xaml中添加HandyControl对应的命名空xmlns:hc="https://handyorg.github.io/handycontrol"

IsMonitoring 是否监测

设定是否启用监听该PasswordBox控件,用于进行密码长度的判定和其他逻辑处理,单独使用无明显可视化效果

    <hc:PasswordBox hc:PasswordBoxAttach.IsMonitoring="True"
                 Width="100"
                 Height="Auto"></hc:PasswordBox>

PasswordLength 密码长度

当密码长度为0时,显示输入提示信息,录入密码,水印消失

    <hc:PasswordBox hc:PasswordBoxAttach.IsMonitoring="True"
                 hc:PasswordBoxAttach.PasswordLength="10"
                 Width="100"
                 Height="Auto"
                 VerticalAlignment="Center"
                 hc:InfoElement.Placeholder="请输入密码"></hc:PasswordBox>

效果:

PasswordAttach.Length