Merge pull request #40 from HandyOrg/master

update doc
This commit is contained in:
眾尋 authored and GitHub committed 2019-06-06 07:48:34 +08:00
commit 1ec6334c29
11 files changed
+34 -37

No files matched your search

@@ -1,5 +0,0 @@
---
title: 建设中
---
建设中
@@ -50,6 +50,10 @@ title: 转换器
如果该转换器获取到的值为`null`则返回`false`,否则返回`true`。 如果该转换器获取到的值为`null`则返回`false`,否则返回`true`。
# Object2VisibilityConverter
如果该转换器获取到的值为`null`则返回`Collapsed`,否则返回`Visible`。
# String2VisibilityConverter # String2VisibilityConverter
该转换器接受一个字符串,如果该字符串为空或者为null,则返回`Collapse`,否则返回`Visible`。 该转换器接受一个字符串,如果该字符串为空或者为null,则返回`Collapse`,否则返回`Visible`。
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

+5 -5
View File
@@ -8,8 +8,8 @@ HandyControl是一套WPF控件库,它几乎重写了所有原生样式,同
- .Net >= 4.0 - .Net >= 4.0
- OS >= win7 - OS >= win7
- IDE >= vs2017 - IDE >= vs2019
- C# >= 7.0 - C# >= 7.3
# 下载 # 下载
@@ -28,7 +28,7 @@ Github上一般每天都有更新,相对而言不适合用于生产。
{% endnote %} {% endnote %}
{% note warning %} {% note warning %}
文档的更新速度必然跟不上最新的Github源码,有出入的地方一切以本文档为准,因为文档是相对稳定的。 文档的更新速度必然跟不上最新的Github源码,有出入的地方一切以Github上Demo示例为准。
{% endnote %} {% endnote %}
# 项目结构介绍 # 项目结构介绍
@@ -38,7 +38,7 @@ Github上一般每天都有更新,相对而言不适合用于生产。
从Github上克隆好源码后,进入src文件夹,该文件夹结构如下: 从Github上克隆好源码后,进入src文件夹,该文件夹结构如下:
![Project_Structure](images/Project_Structure.png) ![Project_Structure](images/Project_Structure.png)
这里一共有三个解决方案sln文件,需要注意的是HandyControl_Core30.sln需要用VS2019打开,其它两个用VS2017即可。 这里一共有4个解决方案sln文件。
`Net_GE45`的意思是.Net版本大于等于4.5 `Net_GE45`的意思是.Net版本大于等于4.5
@@ -83,6 +83,6 @@ Controls中的每个控件一般都能在Themes中找到对应的xaml定义。
{% endnote %} {% endnote %}
{% note info %} {% note info %}
HandyControl_Net_GE45.sln解决方案中包含了3个项目类型,分别是.Net 4.5、.Net 4.6.2和.Net 4.7,请在解决方案配置下拉框中进行选择: 打开HandyControl.sln,在解决方案配置下拉框中选择指定的环境进行编译:
![Build_Config](images/Build_Config.png) ![Build_Config](images/Build_Config.png)
{% endnote %} {% endnote %}
+1 -2
View File
@@ -16,5 +16,4 @@ title: 鸣谢
# 感谢以下捐赠者 # 感谢以下捐赠者
<p><a style="border:0" href="https://github.com/bigorange1900" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/49062011?s=400&v=4" alt="bigorange1900"></a><a style="border:0" href="https://github.com/14632791" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars3.githubusercontent.com/u/27358331?s=400&v=4" alt="bigorange1900"></a></p> <p><a style="border:0" href="https://github.com/bigorange1900" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/49062011?s=400&v=4" alt="bigorange1900"></a><a style="border:0" href="https://github.com/14632791" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars3.githubusercontent.com/u/27358331?s=400&v=4" alt="bigorange1900"></a><a style="border:0" href="https://github.com/IUpdatable" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars2.githubusercontent.com/u/51181716?s=400&v=4" alt="bigorange1900"></a><a style="border:0" href="https://github.com/maplewei" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/13778095?s=400&v=4" alt="bigorange1900"></a></p>
QQ:1942142462
+15 -16
View File
@@ -161,8 +161,8 @@ menu:
HandyControl: HandyControl:
default: /handycontrol/ || default: /handycontrol/ ||
鸣谢: /tnx/ || 鸣谢: /tnx/ ||
总览: /overview/ || # 总览: /overview/ ||
规范: /specifications/ || # 规范: /specifications/ ||
基础xaml定义: 基础xaml定义:
default: /basic_xaml/ || default: /basic_xaml/ ||
行为: /behaviors/ || 行为: /behaviors/ ||
@@ -176,21 +176,20 @@ menu:
尺寸: /sizes/ || 尺寸: /sizes/ ||
附加属性: 附加属性:
default: /attach/ || default: /attach/ ||
BackgroundSwitchElement: /backgroundSwitchElement/ || BackgroundSwitchElement 可切换背景的元素: /backgroundSwitchElement/ ||
BorderElement: /borderElement/ || BorderElement 具有边框的元素: /borderElement/ ||
DataGridAttach: /dataGridAttach/ || DataGridAttach DataGrid专用: /dataGridAttach/ ||
EdgeElement: /edgeElement/ || EdgeElement: /edgeElement/ ||
IconElement: /iconElement/ || IconElement 具有图标的元素: /iconElement/ ||
IconSwitchElement: /iconSwitchElement/ || IconSwitchElement 可切换图标的元素: /iconSwitchElement/ ||
InfoElement: /infoElement/ || InfoElement 信息元素: /infoElement/ ||
LinkElement: /linkElement/ || PanelElement 面板元素: /panelElement/ ||
PanelElement: /panelElement/ || PasswordBoxAttach 密码框专用: /passwordBoxAttach/ ||
PasswordBoxMonitor: /passwordBoxMonitor/ || StatusSwitchElement 可切换状态的元素: /statusSwitchElement/ ||
StatusSwitchElement: /statusSwitchElement/ || TipElement 提示元素: /tipElement/ ||
TipElement: /tipElement/ || TitleElement 标题元素: /titleElement/ ||
TitleElement: /titleElement/ || VisualElement 可视化元素: /visualElement/ ||
VisualElement: /visualElement/ || WindowAttach 窗体专用: /windowAttach/ ||
WindowAttach: /windowAttach/ ||
原生控件: 原生控件:
default: /native_controls/ || default: /native_controls/ ||
Border 边框: /border/ || Border 边框: /border/ ||
@@ -3,13 +3,13 @@ using HandyControl.Data;
namespace HandyControl.Controls namespace HandyControl.Controls
{ {
public class PasswordBoxMonitor public class PasswordBoxAttach
{ {
/// <summary> /// <summary>
/// 密码长度 /// 密码长度
/// </summary> /// </summary>
public static readonly DependencyProperty PasswordLengthProperty = DependencyProperty.RegisterAttached( public static readonly DependencyProperty PasswordLengthProperty = DependencyProperty.RegisterAttached(
"PasswordLength", typeof(int), typeof(PasswordBoxMonitor), new PropertyMetadata(ValueBoxes.Int0Box)); "PasswordLength", typeof(int), typeof(PasswordBoxAttach), new PropertyMetadata(ValueBoxes.Int0Box));
public static void SetPasswordLength(DependencyObject element, int value) => element.SetValue(PasswordLengthProperty, value); public static void SetPasswordLength(DependencyObject element, int value) => element.SetValue(PasswordLengthProperty, value);
@@ -19,7 +19,7 @@ namespace HandyControl.Controls
/// 是否监测 /// 是否监测
/// </summary> /// </summary>
public static readonly DependencyProperty IsMonitoringProperty = DependencyProperty.RegisterAttached( public static readonly DependencyProperty IsMonitoringProperty = DependencyProperty.RegisterAttached(
"IsMonitoring", typeof(bool), typeof(PasswordBoxMonitor), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits, OnIsMonitoringChanged)); "IsMonitoring", typeof(bool), typeof(PasswordBoxAttach), new FrameworkPropertyMetadata(ValueBoxes.FalseBox, FrameworkPropertyMetadataOptions.Inherits, OnIsMonitoringChanged));
private static void OnIsMonitoringChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) private static void OnIsMonitoringChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{ {
@@ -17,7 +17,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\IconSwitchElement.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\IconSwitchElement.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\InfoElement.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\InfoElement.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\PanelElement.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\PanelElement.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\PasswordBoxMonitor.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\PasswordBoxAttach.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\RelativePanel.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\RelativePanel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeTrack.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeTrack.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeThumb.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeThumb.cs" />
@@ -65,7 +65,7 @@
<ScrollViewer Margin="-1,1" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Row="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/> <ScrollViewer Margin="-1,1" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Row="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
</Grid> </Grid>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="controls:PasswordBoxMonitor.PasswordLength" Value="0"> <Trigger Property="controls:PasswordBoxAttach.PasswordLength" Value="0">
<Setter Property="Visibility" TargetName="placeholder" Value="Visible"/> <Setter Property="Visibility" TargetName="placeholder" Value="Visible"/>
</Trigger> </Trigger>
<Trigger Property="IsEnabled" Value="false"> <Trigger Property="IsEnabled" Value="false">
@@ -97,7 +97,7 @@
<ScrollViewer Margin="-1,1" Padding="{TemplateBinding Padding}" Grid.Column="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/> <ScrollViewer Margin="-1,1" Padding="{TemplateBinding Padding}" Grid.Column="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
</Grid> </Grid>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="controls:PasswordBoxMonitor.PasswordLength" Value="0"> <Trigger Property="controls:PasswordBoxAttach.PasswordLength" Value="0">
<Setter Property="Visibility" TargetName="placeholder" Value="Visible"/> <Setter Property="Visibility" TargetName="placeholder" Value="Visible"/>
</Trigger> </Trigger>
<Trigger Property="IsEnabled" Value="false"> <Trigger Property="IsEnabled" Value="false">
@@ -119,7 +119,7 @@
<Setter Property="Padding" Value="7,6"/> <Setter Property="Padding" Value="7,6"/>
<Setter Property="controls:InfoElement.Symbol" Value="●"/> <Setter Property="controls:InfoElement.Symbol" Value="●"/>
<Setter Property="controls:InfoElement.ContentHeight" Value="30.0"/> <Setter Property="controls:InfoElement.ContentHeight" Value="30.0"/>
<Setter Property="controls:PasswordBoxMonitor.IsMonitoring" Value="True"/> <Setter Property="controls:PasswordBoxAttach.IsMonitoring" Value="True"/>
<Setter Property="Template" Value="{StaticResource PasswordBoxExtendTopTemplate}"/> <Setter Property="Template" Value="{StaticResource PasswordBoxExtendTopTemplate}"/>
<Style.Triggers> <Style.Triggers>
<Trigger Property="controls:InfoElement.TitleAlignment" Value="Left"> <Trigger Property="controls:InfoElement.TitleAlignment" Value="Left">
@@ -146,7 +146,7 @@
<ScrollViewer Padding="{TemplateBinding Padding}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/> <ScrollViewer Padding="{TemplateBinding Padding}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
</controls:SimplePanel> </controls:SimplePanel>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="controls:PasswordBoxMonitor.PasswordLength" Value="0"> <Trigger Property="controls:PasswordBoxAttach.PasswordLength" Value="0">
<Setter Property="Visibility" TargetName="placeholder" Value="Visible"/> <Setter Property="Visibility" TargetName="placeholder" Value="Visible"/>
</Trigger> </Trigger>
<Trigger Property="IsEnabled" Value="false"> <Trigger Property="IsEnabled" Value="false">
@@ -296,7 +296,7 @@
<Setter Property="Padding" Value="{StaticResource DefaultInputPadding}"/> <Setter Property="Padding" Value="{StaticResource DefaultInputPadding}"/>
<Setter Property="controls:InfoElement.Symbol" Value="●"/> <Setter Property="controls:InfoElement.Symbol" Value="●"/>
<Setter Property="controls:InfoElement.ContentHeight" Value="{StaticResource DefaultControlHeight}"/> <Setter Property="controls:InfoElement.ContentHeight" Value="{StaticResource DefaultControlHeight}"/>
<Setter Property="controls:PasswordBoxMonitor.IsMonitoring" Value="True"/> <Setter Property="controls:PasswordBoxAttach.IsMonitoring" Value="True"/>
<Setter Property="Focusable" Value="False"/> <Setter Property="Focusable" Value="False"/>
<Setter Property="Template" Value="{StaticResource PasswordBoxPlusTopTemplate}"/> <Setter Property="Template" Value="{StaticResource PasswordBoxPlusTopTemplate}"/>
<Style.Triggers> <Style.Triggers>