11 files changed
+34
-37
No files matched your search
File renamed without changes.
@@ -1,5 +0,0 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -50,6 +50,10 @@ title: 转换器
|
||||
|
||||
如果该转换器获取到的值为`null`则返回`false`,否则返回`true`。
|
||||
|
||||
# Object2VisibilityConverter
|
||||
|
||||
如果该转换器获取到的值为`null`则返回`Collapsed`,否则返回`Visible`。
|
||||
|
||||
# String2VisibilityConverter
|
||||
|
||||
该转换器接受一个字符串,如果该字符串为空或者为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 |
@@ -8,8 +8,8 @@ HandyControl是一套WPF控件库,它几乎重写了所有原生样式,同
|
||||
|
||||
- .Net >= 4.0
|
||||
- OS >= win7
|
||||
- IDE >= vs2017
|
||||
- C# >= 7.0
|
||||
- IDE >= vs2019
|
||||
- C# >= 7.3
|
||||
|
||||
# 下载
|
||||
|
||||
@@ -28,7 +28,7 @@ Github上一般每天都有更新,相对而言不适合用于生产。
|
||||
{% endnote %}
|
||||
|
||||
{% note warning %}
|
||||
文档的更新速度必然跟不上最新的Github源码,有出入的地方一切以本文档为准,因为文档是相对稳定的。
|
||||
文档的更新速度必然跟不上最新的Github源码,有出入的地方一切以Github上Demo示例为准。
|
||||
{% endnote %}
|
||||
|
||||
# 项目结构介绍
|
||||
@@ -38,7 +38,7 @@ Github上一般每天都有更新,相对而言不适合用于生产。
|
||||
从Github上克隆好源码后,进入src文件夹,该文件夹结构如下:
|
||||

|
||||
|
||||
这里一共有三个解决方案sln文件,需要注意的是HandyControl_Core30.sln需要用VS2019打开,其它两个用VS2017即可。
|
||||
这里一共有4个解决方案sln文件。
|
||||
|
||||
`Net_GE45`的意思是.Net版本大于等于4.5
|
||||
|
||||
@@ -83,6 +83,6 @@ Controls中的每个控件一般都能在Themes中找到对应的xaml定义。
|
||||
{% endnote %}
|
||||
|
||||
{% note info %}
|
||||
HandyControl_Net_GE45.sln解决方案中包含了3个项目类型,分别是.Net 4.5、.Net 4.6.2和.Net 4.7,请在解决方案配置下拉框中进行选择:
|
||||
打开HandyControl.sln,在解决方案配置下拉框中选择指定的环境进行编译:
|
||||

|
||||
{% endnote %}
|
||||
@@ -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>
|
||||
QQ:1942142462
|
||||
<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>
|
||||
Vendored
+15
-16
@@ -161,8 +161,8 @@ menu:
|
||||
HandyControl:
|
||||
default: /handycontrol/ ||
|
||||
鸣谢: /tnx/ ||
|
||||
总览: /overview/ ||
|
||||
规范: /specifications/ ||
|
||||
# 总览: /overview/ ||
|
||||
# 规范: /specifications/ ||
|
||||
基础xaml定义:
|
||||
default: /basic_xaml/ ||
|
||||
行为: /behaviors/ ||
|
||||
@@ -176,21 +176,20 @@ menu:
|
||||
尺寸: /sizes/ ||
|
||||
附加属性:
|
||||
default: /attach/ ||
|
||||
BackgroundSwitchElement: /backgroundSwitchElement/ ||
|
||||
BorderElement: /borderElement/ ||
|
||||
DataGridAttach: /dataGridAttach/ ||
|
||||
BackgroundSwitchElement 可切换背景的元素: /backgroundSwitchElement/ ||
|
||||
BorderElement 具有边框的元素: /borderElement/ ||
|
||||
DataGridAttach DataGrid专用: /dataGridAttach/ ||
|
||||
EdgeElement: /edgeElement/ ||
|
||||
IconElement: /iconElement/ ||
|
||||
IconSwitchElement: /iconSwitchElement/ ||
|
||||
InfoElement: /infoElement/ ||
|
||||
LinkElement: /linkElement/ ||
|
||||
PanelElement: /panelElement/ ||
|
||||
PasswordBoxMonitor: /passwordBoxMonitor/ ||
|
||||
StatusSwitchElement: /statusSwitchElement/ ||
|
||||
TipElement: /tipElement/ ||
|
||||
TitleElement: /titleElement/ ||
|
||||
VisualElement: /visualElement/ ||
|
||||
WindowAttach: /windowAttach/ ||
|
||||
IconElement 具有图标的元素: /iconElement/ ||
|
||||
IconSwitchElement 可切换图标的元素: /iconSwitchElement/ ||
|
||||
InfoElement 信息元素: /infoElement/ ||
|
||||
PanelElement 面板元素: /panelElement/ ||
|
||||
PasswordBoxAttach 密码框专用: /passwordBoxAttach/ ||
|
||||
StatusSwitchElement 可切换状态的元素: /statusSwitchElement/ ||
|
||||
TipElement 提示元素: /tipElement/ ||
|
||||
TitleElement 标题元素: /titleElement/ ||
|
||||
VisualElement 可视化元素: /visualElement/ ||
|
||||
WindowAttach 窗体专用: /windowAttach/ ||
|
||||
原生控件:
|
||||
default: /native_controls/ ||
|
||||
Border 边框: /border/ ||
|
||||
|
||||
+3
-3
@@ -3,13 +3,13 @@ using HandyControl.Data;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
public class PasswordBoxMonitor
|
||||
public class PasswordBoxAttach
|
||||
{
|
||||
/// <summary>
|
||||
/// 密码长度
|
||||
/// </summary>
|
||||
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);
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace HandyControl.Controls
|
||||
/// 是否监测
|
||||
/// </summary>
|
||||
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)
|
||||
{
|
||||
@@ -17,7 +17,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\IconSwitchElement.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\InfoElement.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\Slider\RangeSlider\RangeTrack.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"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="controls:PasswordBoxMonitor.PasswordLength" Value="0">
|
||||
<Trigger Property="controls:PasswordBoxAttach.PasswordLength" Value="0">
|
||||
<Setter Property="Visibility" TargetName="placeholder" Value="Visible"/>
|
||||
</Trigger>
|
||||
<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"/>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="controls:PasswordBoxMonitor.PasswordLength" Value="0">
|
||||
<Trigger Property="controls:PasswordBoxAttach.PasswordLength" Value="0">
|
||||
<Setter Property="Visibility" TargetName="placeholder" Value="Visible"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
@@ -119,7 +119,7 @@
|
||||
<Setter Property="Padding" Value="7,6"/>
|
||||
<Setter Property="controls:InfoElement.Symbol" Value="●"/>
|
||||
<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}"/>
|
||||
<Style.Triggers>
|
||||
<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"/>
|
||||
</controls:SimplePanel>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="controls:PasswordBoxMonitor.PasswordLength" Value="0">
|
||||
<Trigger Property="controls:PasswordBoxAttach.PasswordLength" Value="0">
|
||||
<Setter Property="Visibility" TargetName="placeholder" Value="Visible"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
@@ -296,7 +296,7 @@
|
||||
<Setter Property="Padding" Value="{StaticResource DefaultInputPadding}"/>
|
||||
<Setter Property="controls:InfoElement.Symbol" Value="●"/>
|
||||
<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="Template" Value="{StaticResource PasswordBoxPlusTopTemplate}"/>
|
||||
<Style.Triggers>
|
||||
|
||||
Reference in new issue
Block a user