mirror of
https://gitee.com/handyorg/HandyControl.git
synced 2024-12-02 20:07:56 +08:00
update doc
This commit is contained in:
parent
ed72c473ea
commit
f068e08d6f
@ -2,6 +2,8 @@
|
|||||||
title: DataGridAttach DataGrid专用
|
title: DataGridAttach DataGrid专用
|
||||||
---
|
---
|
||||||
|
|
||||||
|
该附加属性为hc内部DataGrid样式专用,不推荐直接使用。
|
||||||
|
|
||||||
# 属性
|
# 属性
|
||||||
|
|
||||||
| 名称 | 用途 |
|
| 名称 | 用途 |
|
||||||
|
@ -1,46 +1,12 @@
|
|||||||
---
|
---
|
||||||
title: PasswordBoxAttach密码框专用
|
title: PasswordBoxAttach 密码框专用
|
||||||
---
|
---
|
||||||
|
|
||||||
|
该附加属性为hc内部密码框样式专用,不推荐直接使用。
|
||||||
|
|
||||||
# 属性
|
# 属性
|
||||||
|
|
||||||
该部分附加属性,仅仅适用于`HandyControl`自定义控件`hc:PasswordBox`以及部分`HandyControl`自带的`PasswordBox`的样式
|
|
||||||
|
|
||||||
| 名称 | 用途 |
|
| 名称 | 用途 |
|
||||||
| -------------- | -------- |
|
| -------------- | -------- |
|
||||||
| IsMonitoring | 是否监测 |
|
| IsMonitoring | 是否监测密码长度 |
|
||||||
| PasswordLength | 密码长度 |
|
| PasswordLength | 密码长度 |
|
||||||
|
|
||||||
# 案例
|
|
||||||
|
|
||||||
对应`xaml`中添加`HandyControl`对应的命名空`xmlns:hc="https://handyorg.github.io/handycontrol"`
|
|
||||||
|
|
||||||
## IsMonitoring 是否监测
|
|
||||||
|
|
||||||
设定是否启用监听该`PasswordBox`控件,用于进行密码长度的判定和其他逻辑处理,单独使用无明显可视化效果
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<hc:PasswordBox hc:PasswordBoxAttach.IsMonitoring="True"
|
|
||||||
Width="100"
|
|
||||||
Height="Auto"></hc:PasswordBox>
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## PasswordLength 密码长度
|
|
||||||
|
|
||||||
当密码长度为0时,显示输入提示信息,录入密码,水印消失
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<hc:PasswordBox hc:PasswordBoxAttach.IsMonitoring="True"
|
|
||||||
hc:PasswordBoxAttach.PasswordLength="10"
|
|
||||||
Width="100"
|
|
||||||
Height="Auto"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
hc:InfoElement.Placeholder="请输入密码"></hc:PasswordBox>
|
|
||||||
```
|
|
||||||
|
|
||||||
效果:
|
|
||||||
|
|
||||||
![PasswordAttach.Length](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/attach/PasswordAttach.Length.png)
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: StatusSwitchElement可切换状态的元素
|
title: StatusSwitchElement 可切换状态的元素
|
||||||
---
|
---
|
||||||
|
|
||||||
# 属性
|
# 属性
|
||||||
@ -9,13 +9,11 @@ title: StatusSwitchElement可切换状态的元素
|
|||||||
| CheckedElement | 选中时展示的元素 |
|
| CheckedElement | 选中时展示的元素 |
|
||||||
| HideUncheckedElement | 是否隐藏元素 |
|
| HideUncheckedElement | 是否隐藏元素 |
|
||||||
|
|
||||||
# 案例
|
# 使用案例
|
||||||
|
|
||||||
对应`xaml`中添加`HandyControl`对应的命名空`xmlns:hc="https://handyorg.github.io/handycontrol"`
|
## CheckedElement 选中时展示的元素
|
||||||
|
|
||||||
## CheckedElement 选中时展开元素
|
此附加属性适用于`ToggleButton`以及子类控件,用于控制选择类控件选中时需要显示的内容,默认值为`False`,不显示。
|
||||||
|
|
||||||
此附加属性适用于`ToggleButton`以及子类控件,用于控制选择类控件选中时,显示的控件内容,默认情况为`False`不显示
|
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<ToggleButton Style="{DynamicResource ToggleButtonCustom}" Margin="5">
|
<ToggleButton Style="{DynamicResource ToggleButtonCustom}" Margin="5">
|
||||||
@ -32,42 +30,43 @@ title: StatusSwitchElement可切换状态的元素
|
|||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
```
|
```
|
||||||
|
|
||||||
效果:
|
|
||||||
|
|
||||||
默认状态(非选中时)和选中状态
|
默认状态(非选中时)和选中状态
|
||||||
|
|
||||||
![StatusSwitchElement.CheckedElement](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/attach/StatusSwitchElement.CheckedElement.png)
|
![StatusSwitchElement.CheckedElement](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/attach/StatusSwitchElement.CheckedElement.png)
|
||||||
|
|
||||||
## HideUncheckedElement 是否隐藏元素
|
## HideUncheckedElement 是否隐藏元素
|
||||||
|
|
||||||
控制选中状态时是否隐藏默认元素,默认为`False`不隐藏
|
当控制在选中状态时,是否隐藏默认内容,默认值为`False`,不隐藏
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
|
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||||
<ToggleButton IsChecked="True" Style="{DynamicResource ToggleButtonCustom}" Margin="5">
|
<ToggleButton IsChecked="True" Style="{DynamicResource ToggleButtonCustom}" Margin="5">
|
||||||
<!--Checked-->
|
<!--Checked-->
|
||||||
<hc:StatusSwitchElement.CheckedElement>
|
<hc:StatusSwitchElement.CheckedElement>
|
||||||
<Border Width="60" Height="20" CornerRadius="0" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
<Border Width="60" Height="20" CornerRadius="0" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource PrimaryBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
<Ellipse Width="18" Height="18" Fill="{DynamicResource PrimaryBrush}"/>
|
||||||
</Border>
|
</Border>
|
||||||
</hc:StatusSwitchElement.CheckedElement>
|
</hc:StatusSwitchElement.CheckedElement>
|
||||||
<!--Default-->
|
<!--Default-->
|
||||||
<Border Width="80" Height="30" CornerRadius="0" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
<Border Width="80" Height="30" CornerRadius="0" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource BorderBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
<Ellipse Width="18" Height="18" Fill="{DynamicResource BorderBrush}"/>
|
||||||
</Border>
|
</Border>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<!--显式设定选中状态下隐藏默认内容元素-->
|
|
||||||
<ToggleButton IsChecked="True" Style="{DynamicResource ToggleButtonCustom}" hc:StatusSwitchElement.HideUncheckedElement="True" Margin="5">
|
<!--显式设定选中状态下隐藏默认内容元素-->
|
||||||
|
<ToggleButton IsChecked="True" Style="{DynamicResource ToggleButtonCustom}" hc:StatusSwitchElement.HideUncheckedElement="True" Margin="5">
|
||||||
<!--Checked-->
|
<!--Checked-->
|
||||||
<hc:StatusSwitchElement.CheckedElement>
|
<hc:StatusSwitchElement.CheckedElement>
|
||||||
<Border Width="60" Height="20" CornerRadius="0" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
<Border Width="60" Height="20" CornerRadius="0" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource PrimaryBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
<Ellipse Width="18" Height="18" Fill="{DynamicResource PrimaryBrush}"/>
|
||||||
</Border>
|
</Border>
|
||||||
</hc:StatusSwitchElement.CheckedElement>
|
</hc:StatusSwitchElement.CheckedElement>
|
||||||
<!--Default-->
|
<!--Default-->
|
||||||
<Border Width="80" Height="30" CornerRadius="0" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
<Border Width="80" Height="30" CornerRadius="0" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource BorderBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
<Ellipse Width="18" Height="18" Fill="{DynamicResource BorderBrush}"/>
|
||||||
</Border>
|
</Border>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
</StackPanel>
|
||||||
```
|
```
|
||||||
|
|
||||||
效果:
|
效果:
|
||||||
|
Loading…
Reference in New Issue
Block a user