add PinBox doc

This commit is contained in:
NaBian committed 2020-08-12 22:43:11 +08:00
1 parent c4ea92d885
commit 6f125b752c
2 files changed
+37 -5

No files matched your search

@@ -1,3 +1,38 @@
---
title: PinBox
title: PinBox PIN码框
---
密码框的另一种形式.
```cs
[TemplatePart(Name = ElementPanel, Type = typeof(Panel))]
public class PinBox : Control
```
# 属性
|属性|描述|默认值|备注|
|-|-|-|-|
|Password|密码||出于安全考虑,无法绑定|
|PasswordChar|掩码字符|●||
|Length|密码长度|4|最小值为4|
|ItemMargin|单元框间隔|||
|ItemWidth|单元框宽度|||
|ItemHeight|单元框高度||||
# 事件
|名称|说明|
|-|-|
| Completed | 输入完成时触发 |
# 案例
```xml
<StackPanel Margin="32" VerticalAlignment="Center" hc:PinBox.Completed="PinBox_OnCompleted">
<hc:PinBox Length="4" Password="1234"/>
<hc:PinBox Length="6" Password="123456" Margin="0,16,0,0" PasswordChar="❤"/>
</StackPanel>
```
![PinBox](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/PinBox.png)
@@ -175,10 +175,7 @@ namespace HandyControl.Controls
{
_passwordList = new List<SecureString>();
if (value == null)
{
value = string.Empty;
}
value ??= string.Empty;
foreach (var item in value)
{