Merge branch 'master' into update-doc

This commit is contained in:
NaBian authored and GitHub committed 2020-02-05 18:10:13 +08:00
commit eb573ab2e6
162 files changed
+4860 -1329

No files matched your search

+16 -2
View File
@@ -36,6 +36,7 @@
<a href="https://github.com/xianyun666" target="_blank"><img width="64px" src="https://avatars1.githubusercontent.com/u/22339210?s=400&v=4"></a>
<a href="https://github.com/afunc233" target="_blank"><img width="64px" src="https://avatars1.githubusercontent.com/u/19919631?s=400&v=4"></a>
<a href="https://github.com/DinoChan" target="_blank"><img width="64px" src="https://avatars1.githubusercontent.com/u/6076257?s=400&v=4"></a>
<a href="https://github.com/MrZhangYuan" target="_blank"><img width="64px" src="https://avatars2.githubusercontent.com/u/16384123?s=400&v=4"></a>
## Backers
@@ -51,6 +52,7 @@
<a href="https://github.com/towerDLH" target="_blank"><img width="64px" src="https://avatars1.githubusercontent.com/u/53053537?s=400&v=4"></a>
<a href="https://github.com/BluceBosen" target="_blank"><img width="64px" src="https://avatars3.githubusercontent.com/u/24750822?s=400&v=4"></a>
<a href="https://github.com/MrZhangYuan" target="_blank"><img width="64px" src="https://avatars2.githubusercontent.com/u/16384123?s=400&v=4"></a>
<a href="https://github.com/YC946586" target="_blank"><img width="64px" src="https://avatars2.githubusercontent.com/u/49895722?s=400&v=4"></a>
## Special thanks to
@@ -96,6 +98,18 @@ Step 4:enjoy coding
## Latest examples
### GlowWindow
![GlowWindow](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/GlowWindow.png)
### FlowDocumentScrollViewerStyle
![FlowDocumentScrollViewerStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/FlowDocumentScrollViewer.png)
### PinBox
![PinBox](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/PinBox.png)
### Effects
![Effects](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Effects.png)
@@ -104,6 +118,8 @@ Step 4:enjoy coding
![RelativePanel](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/RelativePanel.png)
## History publication
### Drawer
![Drawer](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Drawer.gif)
@@ -116,8 +132,6 @@ Step 4:enjoy coding
![Divider](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Divider.png)
## History publication
### GeometryAnimation
![GeometryAnimation](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/GeometryAnimation.gif)
@@ -1,5 +1,19 @@
---
title: 建设中
title: PanelElement 面板元素
---
建设中
# 属性
| 名称 | 用途 |
|-|-|
| FluidMoveBehavior | 设置面板的流体移动方式 |
# 使用案例
## FluidMoveBehavior 设置面板的流体移动方式
```xml
<hc:HoneycombPanel hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}"/>
```
当向面板容器中添加或移除元素时,就可以看到流体移动的动画效果。
@@ -0,0 +1,19 @@
---
title: RectangleAttach Rectangle专用
---
# 属性
| 名称 | 用途 |
|-|-|
| CornerRadius | 设置Rectangle圆角值 |
# 使用案例
## CornerRadius 设置Rectangle圆角值
```xml
<Rectangle Fill="Red" Width="100" Height="60" hc:RectangleAttach.Circular="True"/>
```
![RectangleAttach.CornerRadius](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/attach/RectangleAttach.CornerRadius.png)
@@ -1,3 +1,21 @@
---
title: TextBlockAttach
title: TextBlockAttach 文本块专用
---
# 属性
| 名称 | 用途 |
|-|-|
| AutoTooltip | 设置是否自动显示工具提示 |
# 使用案例
## AutoTooltip 设置是否自动显示工具提示
```xml
<hc:SimplePanel Width="100" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock hc:TextBlockAttach.AutoTooltip="True" Text="EEEEEEEEEEEEEEEEEEEE"/>
</hc:SimplePanel>
```
![TextBlockAttach.AutoTooltip](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/attach/TextBlockAttach.AutoTooltip.png)
@@ -50,6 +50,14 @@ title: 转换器
该转换器需要提供一个字符串作为参数,该字符串的一般形式为:`[0/1],[0/1],[0/1],[0/1]`,4个以逗号分隔的值分别对应`CornerRadius`的`Left`、`Top`,`Right`,`Bottom`属性,当值为1则返回对应属性的值,否则返回0。
# Double2GridLengthConverter
该转换器会将`double`值转换为`GridLength`。
# DoubleMinConverter(内部使用)
可以向该转换器提供一个字符串作为最小值(如果不提供,则最小值默认为0),当传入的值小于最小值时,返回最小值,否则返回传入的值。
# Int2StrConverter
该转换器需要提供一个字符串作为参数,该字符串的一般形式为:`[字符串0];[字符串1];...[字符串n]`,转换器会将一个整型的值作为索引,来获取指定位置的字符串并返回。
@@ -5,7 +5,7 @@ title: 尺寸
| 名称 | 类型 | 值 | 描述 |
|-|-|
| DefaultControlHeight | System.Double | 30 | 默认控件高度 |
| DefaultControlPadding | System.Windows.Thickness | 12,6 | 默认控件内边距 |
| DefaultControlPadding | System.Windows.Thickness | 10,6 | 默认控件内边距 |
| DefaultInputPadding | System.Windows.Thickness | 8,6 |默认输入控件内边距 |
| DefaultCornerRadius | System.Windows.CornerRadius | 4 | 默认圆角 |
@@ -1,5 +1,105 @@
---
title: 建设中
title: NumericUpDown 数值选择控件
---
建设中
NumericUpDown 控件看起来像一对用户可以单击来调整值的箭头按钮和TextBox的组合,该控件显示并设置数值(Value)。 用户可以通过单击向上和向下箭头,或通过在控件的TextBox部分中键入一个数字来改变Value。
``` CS
[TemplatePart(Name = ElementTextBox, Type = typeof(DatePickerTextBox))]
public class DatePicker : System.Windows.Controls.DatePicker, IDataInput
```
# 创建NumericUpDown并设置Value
``` XML
<hc:NumericUpDown Value="100"/>
```
``` CS
var numericUpDown = new NumericUpDown();
numericUpDown.Value = 100;
```
生成的NumericUpDown如下图所示:
![NumericUpDown](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/extend_controls/NumericUpDown_1.png)
# 设置DecimalPlaces
如果需要改变Value显示的小数位数,可以改变DecimalPlaces。DecimalPlaces是一个 **int?** 类型,当它为null时不限制显示的小数位数,否则显示的小数位数为DecimalPlaces的Value。
``` XML
<hc:NumericUpDown DecimalPlaces="2" Value="100.12345"/>
```
``` CS
numericUpDown.Value = 10.12345;
numericUpDown.DecimalPlaces = 2;
```
![NumericUpDown](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/extend_controls/NumericUpDown_2.png)
# 设置Increment
可以通设置Increment改变单击一下按钮时增加或减少的数量。
``` XML
<hc:NumericUpDown Value="100" Increment="10"/>
```
``` CS
numericUpDown.Increment = 10;
```
# 设置上限和下限
可以通设置Maximum和Minimum限制Value的上限和下限。
``` XML
<hc:NumericUpDown Maximum="500" Minimum="10"/>
```
``` CS
numericUpDown.Minimum = 10;
numericUpDown.Maximum = 1000;
```
# 设置标题和占位符文本
你可以将 Header(标题)和 Placeholder(占位符)添加到NumericUpDown,以向用户指示其用途。要使用这两个附加属性,需要先应用 **NumericUpDownPlus** 样式。
``` XML
<hc:NumericUpDown hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}"
hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}"
Style="{StaticResource NumericUpDownExtend}" />
```
![NumericUpDown](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/extend_controls/NumericUpDown_3.png)
# 属性
| 属性 | 描述 |
| ---------------- | ------------------ |
| Value | 获取或设置当前值 |
| Maximum | 获取或设置最大允许值 |
| Minimum | 获取或设置最小允许值 |
| Increment | 获取或设置单击向上或向下按钮时,数字显示框(也称作 up-down 控件)递增或递减的值。 |
| DecimalPlaces |获取或设置NumericUpDown中要显示的十进制位数。 此属性不会影响 Value 属性。 |
| VerifyFunc | 获取或设置数据验证委托 |
| IsError | 获取或设置数据是否错误 |
| ErrorStr | 获取或设置错误提示 |
| TextType | 获取或设置文本类型 |
| ShowClearButton | 获取或设置是否显示清除按钮 |
# 方法
| 方法 | 描述 |
| ---------------- | ------------------ |
| VerifyData() | 验证数据 |
# 事件
| 事件 | 描述 |
| ---------------- | ------------------ |
| ValueChanged | 在以某种方式更改 Value 属性后发生。 |
@@ -12,7 +12,7 @@ TimePicker 控件允许用户通过在文本框中键入时间或使用下拉的
public class TimePicker : Control, IDataInput
```
# 创建DatePicker
# 创建TimePicker
``` XML
<hc:TimePicker />
@@ -32,7 +32,7 @@ var timePicker = new TimePicker();
可以通过文本框输入时间,或者点击文本框右边的按钮打开下拉的时钟控件选择时间。
![DatePicker](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/extend_controls/TimePicker_2.png)
![TimePicker](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/extend_controls/TimePicker_2.png)
也可以在XAML钟或代码中这样设置日期。
@@ -56,7 +56,7 @@ timePicker.SelectedTime = DateTime.Now;
</hc:TimePicker>
```
![DatePicker](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/extend_controls/TimePicker_3.png)
![TimePicker](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/extend_controls/TimePicker_3.png)
# 设置标题和占位符文本
@@ -1,5 +1,115 @@
---
title: 建设中
title: RadioButton 单选按钮
---
建设中
# RadioButtonBaseStyle
单选按钮默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
案例:
```xml
<StackPanel>
<RadioButton Content="默认样式"/>
<RadioButton Margin="0,16,0,0" Content="不可编辑" IsChecked="True" IsEnabled="False"/>
<RadioButton Margin="0,16,0,0" Content="默认样式"/>
<RadioButton Margin="0,16,0,0" Content="不可编辑" IsEnabled="False"/>
</StackPanel>
```
效果:
![RadioButton.DefaultStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/RadioButton.DefaultStyle.png)
# RadioButtonIcon:RadioButtonBaseStyle
带图标样式,可只显示图标也可图文显示
案例:
```xml
<UniformGrid Margin="22,0,0,0" Rows="2" Columns="2">
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" hc:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource RadioButtonIcon}" Content="RadioButtonIcon"/>
<RadioButton Margin="10,0,0,0" Background="{DynamicResource SecondaryRegionBrush}" Style="{StaticResource RadioButtonIcon}" Content="RadioButtonIcon" IsChecked="True"/>
<RadioButton Margin="10,0,0,0" BorderThickness="1" hc:IconElement.Geometry="{StaticResource CalendarGeometry}" Style="{StaticResource RadioButtonIcon}" Content="RadioButtonIcon"/>
<RadioButton Margin="10,0,0,0" BorderThickness="1" Style="{StaticResource RadioButtonIcon}" Content="RadioButtonIcon"/>
</UniformGrid>
```
效果:
![RadioButton.IconStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/RadioButton.IconStyle.png)
# RadioGroupItemBaseStyle
`ButtonGroup`控件中的子集`RadioButton`样式基类,不建议直接使用,常作为`ButtonGroup`中`Item`样式基类,同时与`ButtonGroup`控件配套使用
案例:
```xml
<!--内部Item样式为ButtonGroup控件自动附加-默认为水平方向item样式-->
<hc:ButtonGroup Margin="0,32,0,0">
<RadioButton Content="RadioButton" IsChecked="True"/>
<RadioButton Content="RadioButton"/>
<RadioButton IsEnabled="False" Content="RadioButton"/>
<RadioButton Content="RadioButton"/>
</hc:ButtonGroup>
<hc:ButtonGroup Margin="0,16,0,0" Style="{StaticResource ButtonGroupSolid}">
<RadioButton Content="RadioButton"/>
<RadioButton Content="RadioButton"/>
<RadioButton IsEnabled="False" Content="RadioButton"/>
<RadioButton Content="RadioButton" IsChecked="True"/>
</hc:ButtonGroup>
```
效果:
![RadioButton.RadioButtonItemDefaultStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/RadioButton.RadioButtonItemDefaultStyle.png)
# RadioGroup关联样式
| 样式Key | 用途 | 基类样式 |
| ----------------------------- | ------------------------------------ | ----------------------- |
| RadioGroupItemDefault | RadioGroupItem默认样式 | RadioGroupItemBaseStyle |
| RadioGroupItemHorizontalFirst | RadioGroupItem水平头样式(从左至右) | RadioGroupItemBaseStyle |
| RadioGroupItemHorizontalLast | RadioGroupItem水平尾样式(从左至右) | RadioGroupItemBaseStyle |
| RadioGroupItemSingle | RadioGroupItem单项样式 | RadioGroupItemBaseStyle |
| RadioGroupItemVerticalFirst | RadioGroupItem垂直头样式(从上至下) | RadioGroupItemBaseStyle |
| RadioGroupItemVerticalLast | RadioGroupItem垂直尾样式(从上至下) | RadioGroupItemBaseStyle |
案例:
单个`RadioButton`样式:
```xml
<RadioButton Style="{DynamicResource RadioGroupItemSingle}"
Margin="0,16,8,0"
Content="RadioGroupItemSingle"></RadioButton>
```
效果:
![RadioButton.RadioButtonItemSingleStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/RadioButton.RadioButtonItemSingleStyle.png)
多个`RadioButton`垂直样式:
```xml
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<hc:ButtonGroup Margin="0,16,8,0" Orientation="Vertical">
<RadioButton Content="RadioButton" IsChecked="True"/>
<RadioButton Content="RadioButton"/>
<RadioButton IsEnabled="False" Content="RadioButton"/>
<RadioButton Content="RadioButton"/>
</hc:ButtonGroup>
<hc:ButtonGroup Margin="8,16,0,0" Orientation="Vertical" Style="{StaticResource ButtonGroupSolid}">
<RadioButton Content="RadioButton"/>
<RadioButton Content="RadioButton"/>
<RadioButton IsEnabled="False" Content="RadioButton"/>
<RadioButton Content="RadioButton" IsChecked="True"/>
</hc:ButtonGroup>
</StackPanel>
```
效果:
![RadioButton.RadioButtonItemVerticalStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/RadioButton.RadioButtonItemVerticalStyle.png)
@@ -1,5 +1,21 @@
---
title: 建设中
title: RichTextBox 富文本框
---
建设中
# TextBoxBaseBaseStyle
基础文本控件默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
# RichTextBoxBaseStyle : TextBoxBaseBaseStyle
富文本框默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
案例:
```xml
<RichTextBox Margin="10,10" VerticalAlignment="Center" HorizontalAlignment="Center"></RichTextBox>
```
效果:
![RichTextbox.DefaultStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/RichTextbox.DefaultStyle.png)
@@ -1,5 +1,42 @@
---
title: 建设中
title: ScrollViewer 滚动视图
---
建设中
# ScrollViewerNativeBaseStyle
原生滚动视图默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
案例:
```xml
<ScrollViewer>
<Grid Height="500">
<TextBlock Text="内容区域"></TextBlock>
</Grid>
</ScrollViewer>
```
效果:
![ScrollViewer.DefaultStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/ScrollViewer.DefaultStyle.png)
# ScrollViewerUpDown
显示上下按钮的滚动视图样式
案例:
```xml
<ScrollViewer Style="{StaticResource ScrollViewerUpDown}">
<StackPanel Height="500">
<TextBlock Text="内容区域" Height="250"></TextBlock>
<TextBlock Text="内容区域" Height="250"></TextBlock>
<TextBlock Text="内容区域"></TextBlock>
<TextBlock Text="内容区域"></TextBlock>
</StackPanel>
</ScrollViewer>
```
效果:
![ScrollViewer.UpDownStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/ScrollViewer.UpDownStyle.png)
@@ -1,5 +1,17 @@
---
title: 建设中
title: Slider 滑块
---
建设中
# SliderBaseStyle
滑块默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
案例:
```xml
<Slider VerticalAlignment="Center" Width="400" Value="40" Maximum="100"/>
```
效果:
![Slider.DefaultStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/Slider.DefaultStyle.png)
@@ -1,5 +1,93 @@
---
title: 建设中
title: TabControl 选项卡控件
---
建设中
# TabControlBaseStyle
选项卡控件默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
案例:
```xml
<TabControl Margin="10">
<TabItem Header="选项卡1">
</TabItem>
<TabItem Header="选项卡2">
</TabItem>
<TabItem Header="选项卡3">
</TabItem>
</TabControl>
```
效果:
![TabControl.DefaultStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/TabControl.DefaultStyle.png)
# TabControlInLine : TabControlBaseStyle
单行填充选项卡样式
案例:
```xml
<TabControl Margin="10" Style="{StaticResource TabControlInLine}">
<TabItem Header="选项卡1">
</TabItem>
<TabItem Header="选项卡2">
</TabItem>
<TabItem Header="选项卡3">
</TabItem>
</TabControl>
```
效果:
![TabControl.InLineStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/TabControl.InLineStyle.png)
# TabControlCapsule
胶囊状选项卡样式
案例:
```xml
<TabControl Margin="10" Style="{StaticResource TabControlCapsule}">
<TabItem Header="选项卡1">
</TabItem>
<TabItem Header="选项卡2">
</TabItem>
<TabItem Header="选项卡3">
</TabItem>
</TabControl>
```
效果:
![TabControl.CapsuleStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/TabControl.CapsuleStyle.png)
# TabControlCapsuleSolid : TabControlCapsule
胶囊状(实心)选项卡样式
案例:
```xml
<TabControl Margin="10" Style="{StaticResource TabControlCapsuleSolid}">
<TabItem Header="选项卡1">
</TabItem>
<TabItem Header="选项卡2">
</TabItem>
<TabItem Header="选项卡3">
</TabItem>
</TabControl>
```
效果:
![TabControl.CapsuleSolidStyle](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/TabControl.CapsuleSolidStyle.png)
# 温馨提示
可以使用属性`TabStripPlacement`设定头部标题的位置,效果如下:
![TabControl.TabStripPlacement](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/TabControl.TabStripPlacement.png)
+1 -1
View File
@@ -12,4 +12,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="14632791"></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="IUpdatable"></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="maplewei"></a><a style="border:0" href="https://github.com/sunshang-hl" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/34593206?s=400&v=4" alt="sunshang-hl"></a><a style="border:0" href="https://github.com/yangkang326" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/51224259?s=400&v=4" alt="yangkang326"></a><a style="border:0" href="https://github.com/zmrbak" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars3.githubusercontent.com/u/7257543?s=400&v=4" alt="zmrbak"></a><a style="border:0" href="https://github.com/AFei19911012" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars0.githubusercontent.com/u/31465314?s=400&v=4" alt="AFei19911012"></a><a style="border:0" href="https://github.com/wayne2006" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars0.githubusercontent.com/u/21210915?s=400&v=4" alt="wayne2006"></a><a style="border:0" href="https://github.com/towerDLH" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/53053537?s=400&v=4" alt="towerDLH"></a><a style="border:0" href="https://github.com/BluceBosen" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars3.githubusercontent.com/u/24750822?s=400&v=4" alt="BluceBosen"></a><a style="border:0" href="https://github.com/MrZhangYuan" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars2.githubusercontent.com/u/16384123?s=400&v=4" alt="MrZhangYuan"></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="14632791"></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="IUpdatable"></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="maplewei"></a><a style="border:0" href="https://github.com/sunshang-hl" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/34593206?s=400&v=4" alt="sunshang-hl"></a><a style="border:0" href="https://github.com/yangkang326" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/51224259?s=400&v=4" alt="yangkang326"></a><a style="border:0" href="https://github.com/zmrbak" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars3.githubusercontent.com/u/7257543?s=400&v=4" alt="zmrbak"></a><a style="border:0" href="https://github.com/AFei19911012" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars0.githubusercontent.com/u/31465314?s=400&v=4" alt="AFei19911012"></a><a style="border:0" href="https://github.com/wayne2006" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars0.githubusercontent.com/u/21210915?s=400&v=4" alt="wayne2006"></a><a style="border:0" href="https://github.com/towerDLH" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/53053537?s=400&v=4" alt="towerDLH"></a><a style="border:0" href="https://github.com/BluceBosen" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars3.githubusercontent.com/u/24750822?s=400&v=4" alt="BluceBosen"></a><a style="border:0" href="https://github.com/MrZhangYuan" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars2.githubusercontent.com/u/16384123?s=400&v=4" alt="MrZhangYuan"></a><a style="border:0" href="https://github.com/YC946586" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars2.githubusercontent.com/u/49895722?s=400&v=4" alt="YC946586"></a></p>
+4 -2
View File
@@ -158,7 +158,7 @@ baidu_push: false
# External url should start with http:// or https://
menu:
主页: / ||
HandyControl:
HandyControl - 2.4.0:
default: /handycontrol/ ||
鸣谢: /tnx/ ||
快速开始: /quick_start/ ||
@@ -187,7 +187,9 @@ menu:
LinkElement : /linkElement/ ||
PanelElement 面板元素: /panelElement/ ||
PasswordBoxAttach 密码框专用: /passwordBoxAttach/ ||
RectangleAttach Rectangle专用: /rectangleAttach/ ||
StatusSwitchElement 可切换状态的元素: /statusSwitchElement/ ||
TextBlockAttach 文本块专用: /textBlockAttach/ ||
TipElement 提示元素: /tipElement/ ||
TitleElement 标题元素: /titleElement/ ||
VisualElement 可视化元素: /visualElement/ ||
@@ -900,7 +902,7 @@ needmoreshare2:
# localhost_ignored: true
# CNZZ count
#cnzz_siteid:
cnzz_siteid: 1278600916
# Application Insights
# See: https://azure.microsoft.com/en-us/services/application-insights
@@ -1,5 +1,3 @@
{% if theme.cnzz_siteid %}
<div style="display: none;">
<script src="//s95.cnzz.com/z_stat.php?id={{ theme.cnzz_siteid }}&web_id={{ theme.cnzz_siteid }}"></script>
</div>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? "https://" : "http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_{{ theme.cnzz_siteid }}'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s4.cnzz.com/z_stat.php%3Fid%3D{{ theme.cnzz_siteid }}%26online%3D1%26show%3Dline' type='text/javascript'%3E%3C/script%3E"));</script>
{% endif %}
@@ -457,6 +457,12 @@
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Ellipsis_16x.png">
<Link>Resources\Img\LeftMainContent\Ellipsis_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\WPFFlowDocument_16x.png">
<Link>Resources\Img\LeftMainContent\WPFFlowDocument_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\OutlinedRectangleTool_16x.png">
<Link>Resources\Img\LeftMainContent\OutlinedRectangleTool_16x.png</Link>
</Resource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.en.resx">
@@ -477,6 +483,11 @@
<LastGenOutput>Lang.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Shared\HandyControlDemo_Shared\Properties\App.config">
<Link>Properties\App.config</Link>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\Shared\HandyControlDemo_Shared\Data\MessageToken.tt">
<Link>Data\MessageToken.tt</Link>
@@ -68,4 +68,54 @@
<Link>Resources\Effects\GrayScaleEffect.ps</Link>
</Resource>
</ItemGroup>
<ItemGroup>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\bottom.png">
<Link>Resources\Images\GlowWindow\bottom.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\bottomleft.png">
<Link>Resources\Images\GlowWindow\bottomleft.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\bottomright.png">
<Link>Resources\Images\GlowWindow\bottomright.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornerbottomleft.png">
<Link>Resources\Images\GlowWindow\cornerbottomleft.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornerbottomright.png">
<Link>Resources\Images\GlowWindow\cornerbottomright.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornertopleft.png">
<Link>Resources\Images\GlowWindow\cornertopleft.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornertopright.png">
<Link>Resources\Images\GlowWindow\cornertopright.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\left.png">
<Link>Resources\Images\GlowWindow\left.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\leftbottom.png">
<Link>Resources\Images\GlowWindow\leftbottom.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\lefttop.png">
<Link>Resources\Images\GlowWindow\lefttop.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\right.png">
<Link>Resources\Images\GlowWindow\right.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\rightbottom.png">
<Link>Resources\Images\GlowWindow\rightbottom.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\righttop.png">
<Link>Resources\Images\GlowWindow\righttop.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\top.png">
<Link>Resources\Images\GlowWindow\top.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\topleft.png">
<Link>Resources\Images\GlowWindow\topleft.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\topright.png">
<Link>Resources\Images\GlowWindow\topright.png</Link>
</Resource>
</ItemGroup>
</Project>
@@ -73,7 +73,7 @@
<ScrollViewer Grid.Column="1" Grid.Row="0">
<TextBlock Margin="10,39,10,10" Text="{TemplateBinding Message}" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</ScrollViewer>
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,10,0,16" Orientation="Horizontal" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Center">
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,10,0,16" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsCancel="True" MinWidth="88" Command="interactivity:ControlCommands.Cancel" Content="{x:Static langs:Lang.Cancel}" Margin="5,0"/>
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsDefault="True" MinWidth="88" Command="interactivity:ControlCommands.Confirm" Content="{x:Static langs:Lang.Confirm}" Margin="5,0" Style="{StaticResource ButtonPrimary}"/>
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsCancel="True" MinWidth="88" Command="interactivity:ControlCommands.No" Content="{x:Static langs:Lang.No}" Margin="5,0"/>
@@ -48,18 +48,15 @@
</Style>
<Style TargetType="Window">
<Setter Property="UseLayoutRounding" Value="True"/>
</Style>
<Style x:Key="WindowDefault" TargetType="Window">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="UseLayoutRounding" Value="True"/>
</Style>
<Style x:Key="WindowWin10" TargetType="controls:Window">
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="#262e2f"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="NonClientAreaBackground" Value="{DynamicResource RegionBrush}"/>
@@ -181,6 +178,12 @@
<Setter Property="Background" Value="Transparent"/>
</Style>
<Style x:Key="WindowGlow" BasedOn="{StaticResource WindowWin10}" TargetType="controls:GlowWindow">
<Setter Property="ActiveGlowColor" Value="#262e2f"/>
<Setter Property="InactiveGlowColor" Value="{DynamicResource BorderColor}"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
<Style TargetType="controls:ImageBrowser">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="MinWidth" Value="400"/>
@@ -419,6 +419,11 @@
<LastGenOutput>Lang.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Shared\HandyControlDemo_Shared\Properties\App.config">
<Link>Properties\App.config</Link>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\fabric-icons.ttf">
<Link>Resources\fabric-icons.ttf</Link>
@@ -523,6 +528,12 @@
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Ellipsis_16x.png">
<Link>Resources\Img\LeftMainContent\Ellipsis_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\WPFFlowDocument_16x.png">
<Link>Resources\Img\LeftMainContent\WPFFlowDocument_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\OutlinedRectangleTool_16x.png">
<Link>Resources\Img\LeftMainContent\OutlinedRectangleTool_16x.png</Link>
</Resource>
</ItemGroup>
<ItemGroup>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Data\DemoInfo.json">
@@ -120,6 +120,56 @@
<Link>Resources\Effects\GrayScaleEffect.ps</Link>
</Resource>
</ItemGroup>
<ItemGroup>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\bottom.png">
<Link>Resources\Images\GlowWindow\bottom.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\bottomleft.png">
<Link>Resources\Images\GlowWindow\bottomleft.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\bottomright.png">
<Link>Resources\Images\GlowWindow\bottomright.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornerbottomleft.png">
<Link>Resources\Images\GlowWindow\cornerbottomleft.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornerbottomright.png">
<Link>Resources\Images\GlowWindow\cornerbottomright.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornertopleft.png">
<Link>Resources\Images\GlowWindow\cornertopleft.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornertopright.png">
<Link>Resources\Images\GlowWindow\cornertopright.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\left.png">
<Link>Resources\Images\GlowWindow\left.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\leftbottom.png">
<Link>Resources\Images\GlowWindow\leftbottom.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\lefttop.png">
<Link>Resources\Images\GlowWindow\lefttop.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\right.png">
<Link>Resources\Images\GlowWindow\right.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\rightbottom.png">
<Link>Resources\Images\GlowWindow\rightbottom.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\righttop.png">
<Link>Resources\Images\GlowWindow\righttop.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\top.png">
<Link>Resources\Images\GlowWindow\top.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\topleft.png">
<Link>Resources\Images\GlowWindow\topleft.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\topright.png">
<Link>Resources\Images\GlowWindow\topright.png</Link>
</Resource>
</ItemGroup>
<Import Project="..\..\Shared\HandyControl_Shared\HandyControl_Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -74,7 +74,7 @@
<ScrollViewer Grid.Column="1" Grid.Row="0">
<TextBlock Margin="10,39,10,10" Text="{TemplateBinding Message}" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</ScrollViewer>
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,10,0,16" Orientation="Horizontal" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Center">
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,10,0,16" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsCancel="True" MinWidth="88" Command="interactivity:ControlCommands.Cancel" Content="{x:Static langs:Lang.Cancel}" Margin="5,0"/>
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsDefault="True" MinWidth="88" Command="interactivity:ControlCommands.Confirm" Content="{x:Static langs:Lang.Confirm}" Margin="5,0" Style="{StaticResource ButtonPrimary}"/>
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsCancel="True" MinWidth="88" Command="interactivity:ControlCommands.No" Content="{x:Static langs:Lang.No}" Margin="5,0"/>
@@ -49,18 +49,15 @@
</Style>
<Style TargetType="Window">
<Setter Property="UseLayoutRounding" Value="True"/>
</Style>
<Style x:Key="WindowDefault" BasedOn="{x:Null}" TargetType="Window">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="UseLayoutRounding" Value="True"/>
</Style>
<Style x:Key="WindowWin10" BasedOn="{x:Null}" TargetType="controls:Window">
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="#262e2f"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="NonClientAreaBackground" Value="{DynamicResource RegionBrush}"/>
@@ -182,6 +179,12 @@
<Setter Property="Background" Value="Transparent"/>
</Style>
<Style x:Key="WindowGlow" BasedOn="{StaticResource WindowWin10}" TargetType="controls:GlowWindow">
<Setter Property="ActiveGlowColor" Value="#262e2f"/>
<Setter Property="InactiveGlowColor" Value="{DynamicResource BorderColor}"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
<Style TargetType="controls:ImageBrowser">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="MinWidth" Value="400"/>
@@ -488,6 +488,11 @@
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="..\..\Shared\HandyControlDemo_Shared\Properties\App.config">
<Link>Properties\App.config</Link>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\RepeatButton_16x.png">
<Link>Resources\Img\LeftMainContent\RepeatButton_16x.png</Link>
@@ -586,6 +591,12 @@
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Ellipsis_16x.png">
<Link>Resources\Img\LeftMainContent\Ellipsis_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\WPFFlowDocument_16x.png">
<Link>Resources\Img\LeftMainContent\WPFFlowDocument_16x.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\OutlinedRectangleTool_16x.png">
<Link>Resources\Img\LeftMainContent\OutlinedRectangleTool_16x.png</Link>
</Resource>
</ItemGroup>
<ItemGroup>
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\fabric-icons.ttf">
@@ -191,6 +191,56 @@
<Link>Resources\Effects\GrayScaleEffect.ps</Link>
</Resource>
</ItemGroup>
<ItemGroup>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\bottom.png">
<Link>Resources\Images\GlowWindow\bottom.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\bottomleft.png">
<Link>Resources\Images\GlowWindow\bottomleft.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\bottomright.png">
<Link>Resources\Images\GlowWindow\bottomright.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornerbottomleft.png">
<Link>Resources\Images\GlowWindow\cornerbottomleft.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornerbottomright.png">
<Link>Resources\Images\GlowWindow\cornerbottomright.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornertopleft.png">
<Link>Resources\Images\GlowWindow\cornertopleft.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\cornertopright.png">
<Link>Resources\Images\GlowWindow\cornertopright.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\left.png">
<Link>Resources\Images\GlowWindow\left.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\leftbottom.png">
<Link>Resources\Images\GlowWindow\leftbottom.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\lefttop.png">
<Link>Resources\Images\GlowWindow\lefttop.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\right.png">
<Link>Resources\Images\GlowWindow\right.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\rightbottom.png">
<Link>Resources\Images\GlowWindow\rightbottom.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\righttop.png">
<Link>Resources\Images\GlowWindow\righttop.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\top.png">
<Link>Resources\Images\GlowWindow\top.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\topleft.png">
<Link>Resources\Images\GlowWindow\topleft.png</Link>
</Resource>
<Resource Include="..\..\Shared\HandyControl_Shared\Resources\Images\GlowWindow\topright.png">
<Link>Resources\Images\GlowWindow\topright.png</Link>
</Resource>
</ItemGroup>
<Import Project="..\..\Shared\HandyControl_Shared\HandyControl_Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
@@ -73,7 +73,7 @@
<ScrollViewer Grid.Column="1" Grid.Row="0">
<TextBlock Margin="10,39,10,10" Text="{TemplateBinding Message}" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</ScrollViewer>
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,10,0,16" Orientation="Horizontal" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Center">
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,10,0,16" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsCancel="True" MinWidth="88" Command="interactivity:ControlCommands.Cancel" Content="{x:Static langs:Lang.Cancel}" Margin="5,0"/>
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsDefault="True" MinWidth="88" Command="interactivity:ControlCommands.Confirm" Content="{x:Static langs:Lang.Confirm}" Margin="5,0" Style="{StaticResource ButtonPrimary}"/>
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsCancel="True" MinWidth="88" Command="interactivity:ControlCommands.No" Content="{x:Static langs:Lang.No}" Margin="5,0"/>
@@ -48,18 +48,15 @@
</Style>
<Style TargetType="Window">
<Setter Property="UseLayoutRounding" Value="True"/>
</Style>
<Style x:Key="WindowDefault" TargetType="Window">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="UseLayoutRounding" Value="True"/>
</Style>
<Style x:Key="WindowWin10" TargetType="controls:Window">
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="#262e2f"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="NonClientAreaBackground" Value="{DynamicResource RegionBrush}"/>
@@ -181,6 +178,12 @@
<Setter Property="Background" Value="Transparent"/>
</Style>
<Style x:Key="WindowGlow" BasedOn="{StaticResource WindowWin10}" TargetType="controls:GlowWindow">
<Setter Property="ActiveGlowColor" Value="#262e2f"/>
<Setter Property="InactiveGlowColor" Value="{DynamicResource BorderColor}"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
<Style TargetType="controls:ImageBrowser">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="MinWidth" Value="400"/>
@@ -3,9 +3,11 @@ using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Net;
using System.Runtime;
using System.Security.Authentication;
using System.Threading;
using System.Windows;
using System.Windows.Media.Animation;
using HandyControl.Data;
using HandyControl.Tools;
using HandyControlDemo.Data;
@@ -20,6 +22,19 @@ namespace HandyControlDemo
private static Mutex AppMutex;
#pragma warning restore IDE0052
public App()
{
#if !netle40
var cachePath = $"{AppDomain.CurrentDomain.BaseDirectory}Cache";
if (!Directory.Exists(cachePath))
{
Directory.CreateDirectory(cachePath);
}
ProfileOptimization.SetProfileRoot(cachePath);
ProfileOptimization.StartProfile("Profile");
#endif
}
protected override void OnStartup(StartupEventArgs e)
{
AppMutex = new Mutex(true, "HandyControlDemo", out var createdNew);
@@ -56,6 +71,7 @@ namespace HandyControlDemo
UpdateSkin(GlobalData.Config.Skin);
}
ConfigHelper.Instance.SetWindowDefaultStyle();
ConfigHelper.Instance.SetSystemVersionInfo(CommonHelper.GetSystemVersionInfo());
ServicePointManager.SecurityProtocol = (SecurityProtocolType)(SslProtocols)0x00000C00;
@@ -26,6 +26,7 @@
[ "GroupBox", "GroupBoxDemoCtl", "GroupBox_16x", "" ],
[ "Menu", "MenuDemoCtl", "ContextMenu_16x", "" ],
[ "RichTextBox", "RichTextBoxDemoCtl", "RichTextBox_16x", "" ],
[ "FlowDocumentScrollViewer", "FlowDocumentScrollViewerDemoCtl", "WPFFlowDocument_16x", "1" ],
[ "ToolBar", "ToolBarDemoCtl", "ToolBar_16x", "" ],
[ "Border", "BorderDemoCtl", "BorderElement_16x", "" ],
[ "Label", "LabelDemoCtl", "Label_16x", "" ]
@@ -44,7 +45,7 @@
[ "ButtonGroup", "ButtonGroupDemoCtl", "ButtonGroup_16x", "" ],
[ "ProgressButton", "ProgressButtonDemoCtl", "ProgressButton_16x", "" ],
[ "ChatBubble", "ChatBubbleDemoCtl", "Bubble_16xLG", "" ],
[ "Poptip", "PoptipDemoCtl", "PopupCursor_16x", "1" ],
[ "Poptip", "PoptipDemoCtl", "PopupCursor_16x", "" ],
[ "NotifyIcon", "NotifyIconDemoCtl", "NotificationHub_16x", "" ],
[ "NumericUpDown", "NumericUpDownDemoCtl", "NumericListBox_16x", "" ],
[ "TextBox", "TextBoxDemoCtl", "TextBox_16x", "" ],
@@ -73,7 +74,7 @@
[ "WaterfallPanel", "WaterfallPanelDemoCtl", "Panel_16x", "" ],
[ "HoneycombPanel", "HoneycombPanelDemoCtl", "PolygonHexagon_16x", "" ],
[ "TransitioningContentControl", "TransitioningContentControlDemoCtl", "TransitioningContentControl_16x", "" ],
[ "Drawer", "DrawerDemoCtl", "View_Portrait_16x", "1" ],
[ "Drawer", "DrawerDemoCtl", "View_Portrait_16x", "" ],
[ "CoverView", "CoverViewDemoCtl", "DetailDataView_16x", "" ],
[ "CoverFlow", "CoverFlowDemoCtl", "LinearCarousel_16x", "" ],
[ "ProgressBar", "ProgressBarDemoCtl", "ProgressBar_16x", "" ],
@@ -95,7 +96,7 @@
[ "Sprite", "SpriteDemoCtl", "HandyControl", "" ],
[ "Notification", "NotificationDemoCtl", "Procedure_16x", "" ],
[ "Dialog", "DialogDemoCtl", "Dialog_16x", "" ],
[ "Window", "WindowDemoCtl", "WindowsForm_16x", "" ]
[ "Window", "WindowDemoCtl", "WindowsForm_16x", "1" ]
]
},
{
@@ -40,5 +40,7 @@
public static readonly string QQGroupView = nameof(QQGroupView);
public static readonly string GlowWindow = nameof(GlowWindow);
}
}
@@ -22,7 +22,8 @@ var messageList = new List<string>
"BlurWindow",
"CustomNonClientAreaWindow",
"NoNonClientAreaDragableWindow",
"QQGroupView"
"QQGroupView",
"GlowWindow"
};
#>
namespace HandyControlDemo.Data
@@ -293,6 +293,9 @@
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\ExpanderDemoCtl.xaml.cs">
<DependentUpon>ExpanderDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\FlowDocumentScrollViewerDemoCtl.xaml.cs">
<DependentUpon>FlowDocumentScrollViewerDemoCtl.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\GroupBoxDemoCtl.xaml.cs">
<DependentUpon>GroupBoxDemoCtl.xaml</DependentUpon>
</Compile>
@@ -404,6 +407,9 @@
<Compile Include="$(MSBuildThisFileDirectory)Window\DialogDemoWindow.xaml.cs">
<DependentUpon>DialogDemoWindow.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Window\GlowWindow.xaml.cs">
<DependentUpon>GlowWindow.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Window\GrowlDemoWindow.xaml.cs">
<DependentUpon>GrowlDemoWindow.xaml</DependentUpon>
</Compile>
@@ -800,6 +806,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Styles\FlowDocumentScrollViewerDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)UserControl\Styles\GroupBoxDemoCtl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -916,6 +926,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Window\GlowWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Window\GrowlDemoWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -7,7 +7,6 @@
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
xmlns:data="clr-namespace:HandyControlDemo.Data"
mc:Ignorable="d"
Style="{StaticResource WindowBlur}"
Title="HandyControlDemo"
ShowTitle="False"
ResizeMode="CanResizeWithGrip"
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
</configuration>
@@ -627,6 +627,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
/// <summary>
/// 查找类似 流文档滚动视图 的本地化字符串。
/// </summary>
public static string FlowDocumentScrollViewer {
get {
return ResourceManager.GetString("FlowDocumentScrollViewer", resourceCulture);
}
}
/// <summary>
/// 查找类似 Gif图片 的本地化字符串。
/// </summary>
@@ -1041,6 +1050,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
/// <summary>
/// 查找类似 点击打开辉光窗口 的本地化字符串。
/// </summary>
public static string OpenGlowWindow {
get {
return ResourceManager.GetString("OpenGlowWindow", resourceCulture);
}
}
/// <summary>
/// 查找类似 点击打开图片浏览器 的本地化字符串。
/// </summary>
@@ -714,4 +714,10 @@
<data name="PinBox" xml:space="preserve">
<value>PinBox</value>
</data>
<data name="FlowDocumentScrollViewer" xml:space="preserve">
<value>FlowDocumentScrollViewer</value>
</data>
<data name="OpenGlowWindow" xml:space="preserve">
<value>Open glowWindow</value>
</data>
</root>
@@ -714,4 +714,10 @@
<data name="PinBox" xml:space="preserve">
<value>PinBox</value>
</data>
<data name="FlowDocumentScrollViewer" xml:space="preserve">
<value>FlowDocumentScrollViewer</value>
</data>
<data name="OpenGlowWindow" xml:space="preserve">
<value>Open glowWindow</value>
</data>
</root>
@@ -714,4 +714,10 @@
<data name="PinBox" xml:space="preserve">
<value>PinBox</value>
</data>
<data name="FlowDocumentScrollViewer" xml:space="preserve">
<value>FlowDocumentScrollViewer</value>
</data>
<data name="OpenGlowWindow" xml:space="preserve">
<value>Open glowWindow</value>
</data>
</root>
@@ -714,4 +714,10 @@
<data name="PinBox" xml:space="preserve">
<value>PinBox</value>
</data>
<data name="FlowDocumentScrollViewer" xml:space="preserve">
<value>FlowDocumentScrollViewer</value>
</data>
<data name="OpenGlowWindow" xml:space="preserve">
<value>Open glowWindow</value>
</data>
</root>
@@ -714,4 +714,10 @@
<data name="PinBox" xml:space="preserve">
<value>PIN码框</value>
</data>
<data name="FlowDocumentScrollViewer" xml:space="preserve">
<value>流文档滚动视图</value>
</data>
<data name="OpenGlowWindow" xml:space="preserve">
<value>点击打开辉光窗口</value>
</data>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

@@ -1,18 +1,19 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:o="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Geometries.xaml"/>
</ResourceDictionary.MergedDictionaries>
<DrawingBrush x:Key="MainContentForegroundDrawingBrush" RenderOptions.CachingHint="Cache" Viewport="0,0,16,16" ViewportUnits="Absolute" Stretch="None" TileMode="Tile">
<DrawingBrush o:Freeze="True" x:Key="MainContentForegroundDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,16,16" ViewportUnits="Absolute" Stretch="None" TileMode="Tile">
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="{DynamicResource MainContentForegroundBrush}">
<DrawingGroup o:Freeze="True">
<GeometryDrawing o:Freeze="True" Brush="{DynamicResource MainContentForegroundBrush}">
<GeometryDrawing.Geometry>
<GeometryGroup>
<RectangleGeometry Rect="0,0,8,8" />
<RectangleGeometry Rect="8,8,8,8" />
<GeometryGroup o:Freeze="True">
<RectangleGeometry o:Freeze="True" Rect="0,0,8,8" />
<RectangleGeometry o:Freeze="True" Rect="8,8,8,8" />
</GeometryGroup>
</GeometryDrawing.Geometry>
</GeometryDrawing>
@@ -20,45 +21,45 @@
</DrawingBrush.Drawing>
</DrawingBrush>
<DrawingBrush x:Key="GitHubDrawingBrush" RenderOptions.CachingHint="Cache" Viewport="0,0,200,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
<DrawingBrush o:Freeze="True" x:Key="GitHubDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,200,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
<DrawingBrush.Transform>
<TransformGroup>
<RotateTransform Angle="20"/>
<TransformGroup o:Freeze="True">
<RotateTransform o:Freeze="True" Angle="20"/>
</TransformGroup>
</DrawingBrush.Transform>
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="{DynamicResource DarkMaskBrush}" Geometry="{StaticResource GitHubStrGeometry}"/>
<DrawingGroup o:Freeze="True">
<GeometryDrawing o:Freeze="True" Brush="{DynamicResource DarkMaskBrush}" Geometry="{StaticResource GitHubStrGeometry}"/>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
<DrawingBrush x:Key="QqDrawingBrush" RenderOptions.CachingHint="Cache" Viewport="0,0,100,200" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
<DrawingBrush o:Freeze="True" x:Key="QqDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,100,200" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
<DrawingBrush.Transform>
<TransformGroup>
<RotateTransform Angle="20"/>
<TransformGroup o:Freeze="True">
<RotateTransform o:Freeze="True" Angle="20"/>
</TransformGroup>
</DrawingBrush.Transform>
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="{DynamicResource DarkMaskBrush}" Geometry="{StaticResource QqGeometry}"/>
<DrawingGroup o:Freeze="True">
<GeometryDrawing o:Freeze="True" Brush="{DynamicResource DarkMaskBrush}" Geometry="{StaticResource QqGeometry}"/>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
<DrawingBrush x:Key="BlogDrawingBrush" RenderOptions.CachingHint="Cache" Viewport="0,0,160,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
<DrawingBrush o:Freeze="True" x:Key="BlogDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,160,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
<DrawingBrush.Transform>
<TransformGroup>
<RotateTransform Angle="20"/>
<TransformGroup o:Freeze="True">
<RotateTransform o:Freeze="True" Angle="20"/>
</TransformGroup>
</DrawingBrush.Transform>
<DrawingBrush.Drawing>
<GeometryDrawing>
<GeometryDrawing o:Freeze="True">
<GeometryDrawing.Geometry>
<RectangleGeometry Rect="0,0,160,100"></RectangleGeometry>
<RectangleGeometry o:Freeze="True" Rect="0,0,160,100"></RectangleGeometry>
</GeometryDrawing.Geometry>
<GeometryDrawing.Brush>
<VisualBrush>
<VisualBrush o:Freeze="True" RenderOptions.CachingHint="Cache" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" >
<VisualBrush.Visual>
<StackPanel>
<TextBlock Text="Blog" Foreground="{DynamicResource DarkMaskBrush}"/>
@@ -70,19 +71,19 @@
</DrawingBrush.Drawing>
</DrawingBrush>
<DrawingBrush x:Key="WebsiteDrawingBrush" RenderOptions.CachingHint="Cache" Viewport="0,0,320,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
<DrawingBrush o:Freeze="True" x:Key="WebsiteDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,320,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
<DrawingBrush.Transform>
<TransformGroup>
<RotateTransform Angle="20"/>
<TransformGroup o:Freeze="True">
<RotateTransform o:Freeze="True" Angle="20"/>
</TransformGroup>
</DrawingBrush.Transform>
<DrawingBrush.Drawing>
<GeometryDrawing>
<GeometryDrawing o:Freeze="True">
<GeometryDrawing.Geometry>
<RectangleGeometry Rect="0,0,320,100"></RectangleGeometry>
<RectangleGeometry o:Freeze="True" Rect="0,0,320,100"></RectangleGeometry>
</GeometryDrawing.Geometry>
<GeometryDrawing.Brush>
<VisualBrush>
<VisualBrush o:Freeze="True" RenderOptions.CachingHint="Cache" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0">
<VisualBrush.Visual>
<StackPanel>
<TextBlock Text="Website" Foreground="{DynamicResource DarkMaskBrush}"/>
@@ -94,19 +95,19 @@
</DrawingBrush.Drawing>
</DrawingBrush>
<DrawingBrush x:Key="ProjectDrawingBrush" RenderOptions.CachingHint="Cache" Viewport="0,0,240,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
<DrawingBrush o:Freeze="True" x:Key="ProjectDrawingBrush" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" RenderOptions.CachingHint="Cache" Viewport="0,0,240,100" ViewportUnits="Absolute" Stretch="Uniform" TileMode="Tile">
<DrawingBrush.Transform>
<TransformGroup>
<RotateTransform Angle="20"/>
<TransformGroup o:Freeze="True">
<RotateTransform o:Freeze="True" Angle="20"/>
</TransformGroup>
</DrawingBrush.Transform>
<DrawingBrush.Drawing>
<GeometryDrawing>
<GeometryDrawing o:Freeze="True">
<GeometryDrawing.Geometry>
<RectangleGeometry Rect="0,0,240,100"></RectangleGeometry>
<RectangleGeometry o:Freeze="True" Rect="0,0,240,100"></RectangleGeometry>
</GeometryDrawing.Geometry>
<GeometryDrawing.Brush>
<VisualBrush>
<VisualBrush o:Freeze="True" RenderOptions.CachingHint="Cache" RenderOptions.CacheInvalidationThresholdMinimum="0.5" RenderOptions.CacheInvalidationThresholdMaximum="2.0" >
<VisualBrush.Visual>
<StackPanel>
<TextBlock Text="Project" Foreground="{DynamicResource DarkMaskBrush}"/>
@@ -118,18 +119,18 @@
</DrawingBrush.Drawing>
</DrawingBrush>
<LinearGradientBrush x:Key="MenuButtonBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="White" Offset="0"/>
<GradientStop Color="#F2F2F2" Offset="1"/>
<LinearGradientBrush o:Freeze="True" x:Key="MenuButtonBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop o:Freeze="True" Color="White" Offset="0"/>
<GradientStop o:Freeze="True" Color="#F2F2F2" Offset="1"/>
</LinearGradientBrush>
<LinearGradientBrush x:Key="ToolBarBackground" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#F5F4F5" Offset="0"/>
<GradientStop Color="#D1CFD1" Offset="1"/>
<LinearGradientBrush o:Freeze="True" x:Key="ToolBarBackground" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop o:Freeze="True" Color="#F5F4F5" Offset="0"/>
<GradientStop o:Freeze="True" Color="#D1CFD1" Offset="1"/>
</LinearGradientBrush>
<SolidColorBrush x:Key="MainBackgroundBrush" Color="{DynamicResource MainBackgroundColor}"/>
<SolidColorBrush x:Key="MainContentForegroundBrush" Color="{DynamicResource MainContentForegroundColor}"/>
<SolidColorBrush x:Key="MainContentBackgroundBrush" Color="{DynamicResource MainContentBackgroundColor}"/>
<SolidColorBrush o:Freeze="True" x:Key="MainBackgroundBrush" Color="{DynamicResource MainBackgroundColor}"/>
<SolidColorBrush o:Freeze="True" x:Key="MainContentForegroundBrush" Color="{DynamicResource MainContentForegroundColor}"/>
<SolidColorBrush o:Freeze="True" x:Key="MainContentBackgroundBrush" Color="{DynamicResource MainContentBackgroundColor}"/>
</ResourceDictionary>
@@ -1,31 +1,32 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:o="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options">
<Geometry x:Key="NewGeometry">M512 0h1216a512 512 0 1 1 0 1024H512A512 512 0 1 1 512 0zM420.16 311.04V768h74.88V433.92h2.56l228.48 334.08h72.96V311.04h-75.52v329.6h-2.56l-225.92-329.6h-74.88z m468.48 0V768h340.48v-64h-265.6V565.76h239.36v-64h-239.36V375.04h254.72v-64h-329.6z m369.28 0l131.2 456.96h80l89.6-343.68h2.56l88.96 343.68h79.36l131.84-456.96h-84.48l-85.76 347.52h-2.56l-90.24-347.52h-77.44l-90.24 347.52h-2.56l-85.76-347.52h-84.48z</Geometry>
<Geometry x:Key="LogoGeometry">M40.493382,19.001303 C36.637875,19.06448 33.938568,21.421986 33.948524,25.271919 L34.068279,71.56765 34.066906,71.598007 34.068745,71.747833 34.18895,118.21758 C34.202225,123.35083 39.026951,129.19344 44.965271,131.2674 50.903587,133.34137 55.706783,130.86133 55.693504,125.72808 L55.589508,85.524513 93.866371,85.524513 93.950943,118.21758 C93.964218,123.35083 98.788948,129.19344 104.72726,131.2674 110.66558,133.34137 115.46878,130.86133 115.4555,125.72808 L115.33575,79.432381 115.33712,79.401993 115.33528,79.252007 115.21507,32.782413 C115.2018,27.64917 110.37708,21.806566 104.43876,19.732603 98.500435,17.658638 93.697243,20.138674 93.710518,25.271919 L93.814514,65.475487 55.537647,65.475487 55.453079,32.782413 C55.439804,27.64917 50.615082,21.806566 44.676762,19.732603 43.192181,19.214111 41.778549,18.980244 40.493382,19.001303 z M9.999999,0 L140,0 C145.52284,0 150,4.4771523 150,9.999999 L150,140 C150,145.52284 145.52284,150 140,150 L9.999999,150 C4.4771523,150 0,145.52284 0,140 L0,9.999999 C0,4.4771523 4.4771523,0 9.999999,0 z</Geometry>
<Geometry x:Key="CirclePanelDemoGeometry">M28.677037,-2.2499313E-22 C38.75065,24.740243 38.50705,52.437974 27.999852,77.000001 L-1.7053028E-13,65.206651 C7.3550318,48.013234 7.5255431,28.624822 0.4740567,11.306663 z</Geometry>
<Geometry x:Key="CirclePanelRightGeometry">M267.287478 892.162257c0 45.149912 59.597884 71.336861 93.008818 37.925926L740.458554 549.925926c21.671958-21.671958 21.671958-54.179894 0-75.851852L360.296296 93.911817c-33.410935-33.410935-93.008818-5.417989-93.008818 38.828924v759.421516z m0 0</Geometry>
<Geometry x:Key="GithubGeometry">M512 0C229.12 0 0 229.12 0 512c0 226.56 146.56 417.92 350.08 485.76 25.6 4.48 35.2-10.88 35.2-24.32 0-12.16-0.64-52.48-0.64-95.36-128.64 23.68-161.92-31.36-172.16-60.16-5.76-14.72-30.72-60.16-52.48-72.32-17.92-9.6-43.52-33.28-0.64-33.92 40.32-0.64 69.12 37.12 78.72 52.48 46.08 77.44 119.68 55.68 149.12 42.24 4.48-33.28 17.92-55.68 32.64-68.48-113.92-12.8-232.96-56.96-232.96-252.8 0-55.68 19.84-101.76 52.48-137.6-5.12-12.8-23.04-65.28 5.12-135.68 0 0 42.88-13.44 140.8 52.48 40.96-11.52 84.48-17.28 128-17.28 43.52 0 87.04 5.76 128 17.28 97.92-66.56 140.8-52.48 140.8-52.48 28.16 70.4 10.24 122.88 5.12 135.68 32.64 35.84 52.48 81.28 52.48 137.6 0 196.48-119.68 240-233.6 252.8 18.56 16 34.56 46.72 34.56 94.72 0 68.48-0.64 123.52-0.64 140.8 0 13.44 9.6 29.44 35.2 24.32A512.832 512.832 0 0 0 1024 512c0-282.88-229.12-512-512-512z</Geometry>
<Geometry x:Key="NugetGeometry">M449.722947 199.412211H706.021053c130.967579 0 237.136842 106.169263 237.136842 237.136842v256.298105c0 130.967579-106.169263 237.136842-237.136842 237.136842H449.722947c-130.965895 0-237.136842-106.169263-237.136842-237.136842V436.549053c0-130.967579 106.170947-237.136842 237.136842-237.136842z m-201.205894-21.557895c0-64.299789-70.085053-104.704-125.850948-72.55579s-55.764211 112.96 0 145.111579 125.850947-8.257684 125.850948-72.555789z m239.528421 234.74021c0-68.003368-74.088421-110.736842-133.037474-76.734315s-58.950737 119.467789 0 153.470315 133.039158-8.730947 133.039158-76.736zM835.368421 692.847158c0-117.596632-128.154947-191.494737-230.123789-132.695579s-101.970526 206.593684 0 265.391158S835.368421 810.443789 835.368421 692.847158z</Geometry>
<Geometry x:Key="EmailGeometry">M430.079734 481.464543c45.196365 45.596478 118.486578 45.596478 163.68499 0l360.684736-324.939627c0.547469 3.751441 1.13894 7.490601 1.13894 11.401678l0 404.753417 0 116.754121c0 42.995233-34.547841 77.838809-77.145008 77.838809L145.397996 767.272941c-42.597167 0-77.145008-34.844599-77.145008-77.838809L68.252988 494.839155 68.252988 167.926594c0-3.911076 0.593518-7.65126 1.139963-11.401678L430.079734 481.464543zM910.960992 74.226538 562.044278 387.28558c-38.470173 38.811957-62.276369 38.811957-100.770078 0L112.538611 74.408687c10.011005-4.789073 21.069875-7.673773 32.859385-7.673773l733.044372 0C890.095779 66.735937 901.065622 69.539796 910.960992 74.226538z</Geometry>
<Geometry x:Key="GitterGeometry">M260.8 645H160V0h100.8v645zM461.8 152.2h-100.8V1024h100.8V152.2z m201.2 0h-100.8V1024h100.8V152.2zM864 152h-100.8v494H864V152z</Geometry>
<Geometry x:Key="WebsiteGeometry">M698.026667 597.333333C701.44 569.173333 704 541.013333 704 512 704 482.986667 701.44 454.826667 698.026667 426.666667L842.24 426.666667C849.066667 453.973333 853.333333 482.56 853.333333 512 853.333333 541.44 849.066667 570.026667 842.24 597.333333M622.506667 834.56C648.106667 787.2 667.733333 736 681.386667 682.666667L807.253333 682.666667C766.293333 753.066667 701.013333 807.68 622.506667 834.56M611.84 597.333333 412.16 597.333333C407.893333 569.173333 405.333333 541.013333 405.333333 512 405.333333 482.986667 407.893333 454.4 412.16 426.666667L611.84 426.666667C615.68 454.4 618.666667 482.986667 618.666667 512 618.666667 541.013333 615.68 569.173333 611.84 597.333333M512 851.626667C476.586667 800.426667 448 743.68 430.506667 682.666667L593.493333 682.666667C576 743.68 547.413333 800.426667 512 851.626667M341.333333 341.333333 216.746667 341.333333C257.28 270.506667 322.986667 215.893333 401.066667 189.44 375.466667 236.8 356.266667 288 341.333333 341.333333M216.746667 682.666667 341.333333 682.666667C356.266667 736 375.466667 787.2 401.066667 834.56 322.986667 807.68 257.28 753.066667 216.746667 682.666667M181.76 597.333333C174.933333 570.026667 170.666667 541.44 170.666667 512 170.666667 482.56 174.933333 453.973333 181.76 426.666667L325.973333 426.666667C322.56 454.826667 320 482.986667 320 512 320 541.013333 322.56 569.173333 325.973333 597.333333M512 171.946667C547.413333 223.146667 576 280.32 593.493333 341.333333L430.506667 341.333333C448 280.32 476.586667 223.146667 512 171.946667M807.253333 341.333333 681.386667 341.333333C667.733333 288 648.106667 236.8 622.506667 189.44 701.013333 216.32 766.293333 270.506667 807.253333 341.333333M512 85.333333C276.053333 85.333333 85.333333 277.333333 85.333333 512 85.333333 747.52 276.48 938.666667 512 938.666667 747.52 938.666667 938.666667 747.52 938.666667 512 938.666667 276.48 747.52 85.333333 512 85.333333Z</Geometry>
<Geometry x:Key="FaceBookGeometry">m 41.416254,90 c -0.327378,-7.4702 0.20833,-32.7284 0,-39.901 -5.386902,-0.2083 -4.521603,0.3274 -9.848987,0 0.20833,-5.50595 0.36436,-7.66666 0.126269,-13.32142 4.646472,0.0181 3.439989,-0.009 9.848987,-0.1894 0.09586,-3.7736 0.133082,-3.0791 0.126269,-7.38674 0.18259,-3.73943 -0.486609,-10.54308 4.293149,-14.96288 4.779758,-4.4198 13.606811,-3.64808 22.223356,-3.53554 -0.04417,5.73754 -0.03936,9.37986 0,12.87945 -5.049924,0.46388 -7.309188,-0.33689 -10.85914,1.26269 -1.403378,3.17794 -1.569601,4.80531 -1.262691,11.93242 3.147964,-0.13336 8.201788,-0.1378 12.626907,0 -0.995158,6.00899 -0.948285,7.62376 -1.767767,13.06882 -3.676625,0.088 -5.605721,-0.1488 -11.111678,0 -0.148814,6.756 0.357147,33.0107 0,40.1536 -6.428576,0.1786 -8.174438,-0.03 -14.394674,0 z</Geometry>
<Geometry x:Key="TwitterGeometry">m 10.44335,90 c 11.073313,0.3952 19.483106,-1.8358 23.901837,-7.1603 -7.9736,-1.4292 -11.832311,-4.1933 -15.078321,-11.0837 3.459698,0.8219 5.795894,0.6358 7.606781,-0.607 -7.19593,-1.719 -12.734543,-6.7971 -13.741664,-15.836 2.766355,1.55307 5.466848,2.66623 7.828682,2.0203 -4.336544,-2.92911 -9.838998,-10.47636 -5.555839,-22.47589 8.400675,11.87052 23.824269,17.67568 33.840111,17.67767 -0.936406,-9.74688 5.88057,-19.46521 15.302849,-19.97853 8.13118,-0.50719 10.57457,4.01944 12.476346,4.82624 3.644547,0.13419 7.393301,-1.74401 10.354063,-3.53553 -1.380842,4.47157 -5.06769,5.62903 -6.313453,8.58629 5.42317,0.41513 5.891376,-1.53111 8.333758,-2.0203 -2.071414,3.75017 -5.393863,5.00034 -7.323606,8.08122 -1.633654,16.12573 -5.16049,27.57123 -14.647212,36.36553 -13.825764,11.3764 -34.755458,17.369 -56.984332,5.14 z</Geometry>
<Geometry x:Key="ThumbsUpGeometry">M68.191078 915.462005l161.384597 0L229.575676 431.30719 68.191078 431.30719 68.191078 915.462005zM955.808922 471.653083c0-44.582381-36.109406-80.69281-80.69281-80.69281L620.329241 390.960273 658.859789 206.578915c0.807389-4.034896 1.412163-8.271384 1.412163-12.709463 0-16.743336-6.859221-31.873941-17.752316-42.767036l-42.968627-42.565445L333.871043 374.216937c-14.524808 14.7264-23.602557 34.899858-23.602557 57.090253l0 403.462005c0 44.582381 36.109406 80.69281 80.69281 80.69281l363.116111 0c33.487695 0 62.133106-20.37505 74.236771-49.222051l121.643478-284.441261c3.63069-9.279341 5.850242-19.164478 5.850242-29.452799L955.807898 475.083206l-0.403183-0.403183L955.808922 471.653083z</Geometry>
<Geometry x:Key="ImageGeometry">M736 224H288a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V288a64 64 0 0 0-64-64z m-416 160a64 64 0 1 1 128.032 0.032A64 64 0 0 1 320 384z m416 320a32 32 0 0 1-32 32H384a32 32 0 0 1-32-32l96-160c26.432-2.048 68.128 6.016 128 64l128-224a32 32 0 0 1 32 32v288z</Geometry>
<Geometry x:Key="KeyboardGeometry">M19.692308 512A25 25 0 1 1 19.692308 531.692308ZM512 303.027832C512 286.548884 524.86564 273.174666 540.717948 273.174666L598.153846 273.174666C614.006154 273.174666 626.871794 286.548884 626.871794 303.027832L626.871794 362.734167C626.871794 379.213115 614.006154 392.587333 598.153846 392.587333L540.717948 392.587333C524.86564 392.587333 512 379.213115 512 362.734167L512 303.027832 512 303.027832ZM512 482.146834 512 541.853166C512 558.332115 499.13436 571.706335 483.282052 571.706335L425.846154 571.706335C409.993846 571.706335 397.128206 558.332115 397.128206 541.853166L397.128206 482.146834C397.128206 465.667885 409.993846 452.293665 425.846154 452.293665L483.282052 452.293665C499.13436 452.293665 512 465.667885 512 482.146834L512 482.146834ZM339.692308 303.027832C339.692308 286.548884 352.557948 273.174666 368.410256 273.174666L425.846154 273.174666C441.698462 273.174666 454.564102 286.548884 454.564102 303.027832L454.564102 362.734167C454.564102 379.213115 441.698462 392.587333 425.846154 392.587333L368.410256 392.587333C352.557948 392.587333 339.692308 379.213115 339.692308 362.734167L339.692308 303.027832 339.692308 303.027832ZM167.384615 303.027832C167.384615 286.548884 180.250256 273.174666 196.102564 273.174666L253.538462 273.174666C269.390769 273.174666 282.25641 286.548884 282.25641 303.027832L282.25641 362.734167C282.25641 379.213115 269.390769 392.587333 253.538462 392.587333L196.102564 392.587333C180.250256 392.587333 167.384615 379.213115 167.384615 362.734167L167.384615 303.027832 167.384615 303.027832ZM282.25641 720.972168C282.25641 737.451116 269.390769 750.825334 253.538462 750.825334L196.102564 750.825334C180.250256 750.825334 167.384615 737.451116 167.384615 720.972168L167.384615 661.265833C167.384615 644.786885 180.250256 631.412667 196.102564 631.412667L253.538462 631.412667C269.390769 631.412667 282.25641 644.786885 282.25641 661.265833L282.25641 720.972168 282.25641 720.972168ZM310.97436 571.706335 253.538462 571.706335C237.686154 571.706335 224.820513 558.332115 224.820513 541.853166L224.820513 482.146834C224.820513 465.667885 237.686154 452.293665 253.538462 452.293665L310.97436 452.293665C326.826667 452.293665 339.692308 465.667885 339.692308 482.146834L339.692308 541.853166C339.692308 558.332115 326.826667 571.706335 310.97436 571.706335L310.97436 571.706335ZM569.435898 720.972168C569.435898 737.451116 556.570256 750.825334 540.717948 750.825334L368.410256 750.825334C352.557948 750.825334 339.692308 737.451116 339.692308 720.972168L339.692308 661.265833C339.692308 644.786885 352.557948 631.412667 368.410256 631.412667L540.717948 631.412667C556.570256 631.412667 569.435898 644.786885 569.435898 661.265833L569.435898 720.972168 569.435898 720.972168ZM569.435898 541.853166 569.435898 482.146834C569.435898 465.667885 582.301538 452.293665 598.153846 452.293665L655.589744 452.293665C671.442052 452.293665 684.307692 465.667885 684.307692 482.146834L684.307692 541.853166C684.307692 558.332115 671.442052 571.706335 655.589744 571.706335L598.153846 571.706335C582.301538 571.706335 569.435898 558.332115 569.435898 541.853166L569.435898 541.853166ZM856.615385 720.972168C856.615385 737.451116 843.749744 750.825334 827.897437 750.825334L655.589744 750.825334C639.737437 750.825334 626.871794 737.451116 626.871794 720.972168L626.871794 661.265833C626.871794 644.786885 639.737437 631.412667 655.589744 631.412667L713.02564 631.412667C728.877948 631.412667 741.74359 618.038449 741.74359 601.559501L741.74359 482.146834C741.74359 465.667885 754.609231 452.293665 770.461538 452.293665L827.897437 452.293665C843.749744 452.293665 856.615385 465.667885 856.615385 482.146834L856.615385 720.972168 856.615385 720.972168ZM856.615385 362.734167C856.615385 379.213115 843.749744 392.587333 827.897437 392.587333L713.02564 392.587333C697.173333 392.587333 684.307692 379.213115 684.307692 362.734167L684.307692 303.027832C684.307692 286.548884 697.173333 273.174666 713.02564 273.174666L827.897437 273.174666C843.749744 273.174666 856.615385 286.548884 856.615385 303.027832L856.615385 362.734167 856.615385 362.734167Z</Geometry>
<Geometry x:Key="LoveGeometry">M890.2 208.2c-91.8-91.9-242.1-91.9-334 0L544.4 220c-18.2 18.2-47.6 18.2-65.8 0l-11.8-11.8c-91.9-91.9-242.1-91.9-334 0C41 300 24.7 533.9 203.6 722.1 304 827.8 412.4 882.3 470 905.9c26.6 10.9 56.5 10.9 83 0 57.6-23.6 166-78.1 266.4-183.8 178.9-188.2 162.6-422 70.8-513.9z</Geometry>
<Geometry x:Key="CnblogsGeometry">M512 0C229.234472 0 0 229.226146 0 512 0 794.765528 229.234472 1024 512 1024S1024 794.765528 1024 512C1024 229.226146 794.765528 0 512 0zM228.776585 836.066862c-63.163317 0-114.371642-51.208325-114.371642-114.371642S165.613268 607.323577 228.776585 607.323577s114.371642 51.208325 114.371643 114.371643c0 63.171642-51.208325 114.371642-114.371643 114.371642z m420.555968-89.612488a391.867317 391.867317 0 0 1-1.989724 16.975089c-7.259577 30.203837-33.950179 52.898341-66.376845 52.898342-38.104455 0-68.990959-34.158309-68.99096-72.204488 0-5.877593 0.81587-11.463805 2.206179-16.775284-1.756618-131.096976-103.981789-237.867707-233.205593-246.883903l-6.343805-0.740943-1.015675-0.041626c-5.453008-0.216455-10.930992-0.732618-16.142569-2.331057a67.958634 67.958634 0 0 1-47.91987-65.078114c0-37.604943 30.245463-68.091837 67.550699-68.091837 0.299707 0 0.591089 0.041626 0.890797 0.049951l0.124878-0.049951c205.707447 2.139577 371.836878 169.484488 371.836878 375.699772 0 7.717463-0.341333 15.34335-0.824195 22.94426 0.066602 1.207154 0.19148 2.397659 0.199805 3.629789z m254.085203-63.329821c-10.856065 45.172553-25.80813 104.114992-74.310764 104.114992-56.994341 0-48.236228-66.085463-48.236228-122.996553 0-8.791415 1.223805-17.149919 3.296781-25.100488-2.639089-196.108488-169.834146-387.812943-363.137041-401.291447l-35.806699-5.827642c-42.117203-7.492683-111.715902-3.255154-111.715903-49.193626 0-56.253398 50.234276-81.861724 106.038114-81.861724 0.449561 0 0.882472 0.058276 1.332033 0.066602l0.183154-0.066602c307.724488 3.180228 526.252748 208.546341 526.252748 517.028423a538.474146 538.474146 0 0 1-1.23213 34.316488c0.108228 1.806569 0.291382 3.596488 0.308033 5.428032a542.72 542.72 0 0 1-2.972098 25.383545z</Geometry>
<Geometry x:Key="ConfigGeometry">M827.904 541.184a278.592 278.592 0 0 0 0-58.368l73.728-58.368c15.872-13.056 20.224-35.584 9.728-53.504l-78.592-137.728c-9.984-17.408-31.232-25.856-51.712-18.176l-86.528 35.072c-15.872-11.52-32.512-21.248-49.664-29.184l-12.8-92.928c-3.072-20.224-20.736-35.584-41.216-35.584h-157.44c-20.736 0-38.144 14.848-41.216 35.84L378.88 221.44c-17.152 7.936-33.792 17.92-49.664 29.184L242.688 215.296c-18.688-7.168-41.216 0.768-51.2 18.176L112.64 371.2c-10.24 17.92-6.144 40.448 10.24 53.76l73.472 58.112c-1.024 9.472-1.536 19.2-1.536 29.184 0 9.728 0.512 19.456 1.536 29.184l-73.984 58.368c-15.872 13.056-19.968 35.584-9.728 53.248l78.848 137.728c9.984 17.408 32 25.856 51.456 17.92l86.528-35.072c15.872 11.52 32.512 21.248 49.664 29.184l13.056 93.696c3.328 20.48 20.48 35.328 41.216 35.328h157.44c20.48 0 38.144-15.36 41.216-35.84l13.056-93.184c17.152-7.936 33.792-17.664 49.664-29.184l86.784 35.328c4.864 1.792 9.984 2.816 15.104 2.816 14.848 0 28.672-7.936 36.096-20.992l78.592-137.728c10.24-17.664 6.4-40.192-9.984-53.76l-73.472-58.112z m-25.344 231.168l-99.584-40.448c-7.424-3.072-15.872-1.792-22.272 3.072-19.712 15.36-40.704 27.648-62.464 36.608-7.424 3.072-12.544 9.728-13.568 17.664l-14.592 104.96-155.392 2.304-15.104-107.264c-1.024-7.936-6.4-14.592-13.568-17.664-21.76-8.96-42.752-21.504-62.464-36.608-4.096-3.072-8.96-4.608-13.824-4.608-2.816 0-5.888 0.512-8.448 1.536l-96.256 41.472-80.896-137.216 84.48-66.816c6.144-4.864 9.472-12.8 8.448-20.48-1.536-12.032-2.56-24.32-2.56-36.608 0-12.288 1.024-24.576 2.56-36.608 1.024-7.936-2.048-15.616-8.448-20.48l-83.712-64 76.544-139.264 99.584 40.448c7.424 3.072 15.872 1.792 22.272-3.072 19.712-15.36 40.96-27.648 62.72-36.864 7.424-3.072 12.544-9.728 13.568-17.664l12.544-104.704 157.696-2.304 15.104 107.264c1.024 7.936 6.4 14.592 13.568 17.664 21.76 8.96 42.752 21.504 62.464 36.864 6.4 4.864 14.848 6.144 22.272 3.072l96.256-41.472 80.896 137.216-84.48 66.816c-6.144 4.864-9.472 12.544-8.448 20.48 1.536 12.032 2.56 24.32 2.56 36.608 0 12.288-1.024 24.576-2.56 36.608-1.024 7.936 2.304 15.616 8.448 20.48l83.712 63.744-77.056 139.264zM512 345.6c-91.136 0-165.12 74.752-165.12 166.4s73.984 166.4 165.12 166.4 165.12-74.752 165.12-166.4-73.984-166.4-165.12-166.4z m0 297.216c-71.168 0-129.28-58.624-129.28-130.816 0-72.192 58.112-130.816 129.28-130.816s129.28 58.624 129.28 130.816c0 72.192-57.856 130.816-129.28 130.816z</Geometry>
<Geometry x:Key="ContributorsGeometry">M657.486769 287.744c5.671385 0 11.264-5.671385 16.935385-5.671385l186.289231-124.140307c5.592615-5.592615 16.935385-16.935385 16.935384-28.199385V73.334154A74.673231 74.673231 0 0 0 804.233846 0H606.680615v220.002462c0 22.606769-16.935385 33.870769-39.463384 33.870769H454.262154c-22.528 0-39.463385-16.935385-39.463385-33.870769V5.671385H222.838154c-45.134769 0-79.005538 33.870769-79.005539 73.255384v56.477539c0 11.264 5.671385 22.528 16.935385 28.199384l186.289231 124.140308h16.935384C200.310154 349.735385 98.697846 507.746462 121.304615 693.878154c22.528 169.275077 169.353846 310.350769 344.221539 327.207384 237.095385 28.199385 440.32-152.339692 440.32-377.934769 0-158.011077-101.612308-299.008-248.359385-355.406769z m-146.747077 671.271385C335.793231 959.015385 189.046154 818.018462 189.046154 643.150769c0-174.867692 146.747077-310.350769 321.693538-310.350769 174.946462 0 321.693538 141.075692 321.693539 315.943385s-146.747077 310.350769-321.693539 310.350769zM670.798769 572.967385l-68.371692-11.185231a31.507692 31.507692 0 0 1-28.514462-16.777846l-28.514461-55.926154c-17.092923-27.963077-51.278769-27.963077-68.371692 0l-28.514462 55.926154a31.507692 31.507692 0 0 1-28.514462 16.777846l-68.371692 11.185231c-28.514462 5.592615-39.936 39.148308-17.092923 61.44l45.528615 39.227077c5.750154 11.185231 17.171692 22.370462 11.421539 33.555692l-11.421539 67.111384c-5.671385 27.963077 28.514462 50.333538 51.357539 33.555693l62.700308-27.963077a37.021538 37.021538 0 0 1 34.185846 0l62.700307 33.555692c28.514462 16.777846 57.028923-5.592615 51.27877-33.555692l-11.421539-67.111385c0-16.777846 5.750154-27.963077 11.421539-33.555692l51.278769-44.740923a38.596923 38.596923 0 0 0-22.843077-61.518769z</Geometry>
<Geometry x:Key="GitHubStrGeometry">M1185.92 769.92h-1.28c0.576 0 0.96 0.64 1.536 0.704h0.384l-0.64-0.64z m0.256 0.704c-5.952 0.064-20.928 3.2-36.736 3.2-49.92 0-67.2-23.04-67.2-53.12V520.32h101.76c5.76 0 10.24-5.12 10.24-12.16v-108.8c0-5.76-5.12-10.88-10.24-10.88h-101.76V253.44c0-5.12-3.2-8.32-8.96-8.32h-138.24c-5.76 0-8.96 3.2-8.96 8.32v138.88s-69.76 17.28-74.24 17.92c-5.12 1.28-8.32 5.76-8.32 10.88v87.04c0 7.04 5.12 12.16 10.88 12.16h71.04v209.92c0 156.16 108.8 172.16 183.04 172.16 33.92 0 74.88-10.88 81.28-14.08 3.84-1.28 5.76-5.76 5.76-10.24v-96a11.328 11.328 0 0 0-9.344-11.52z m1516.544-140.8c0-115.84-46.72-131.2-96-126.08-38.4 2.56-69.12 21.76-69.12 21.76v225.28s31.36 21.76 78.08 23.04c65.92 1.92 87.04-21.76 87.04-144z m155.52-10.24c0 219.52-71.04 282.24-195.2 282.24-104.96 0-161.28-53.12-161.28-53.12s-2.56 29.44-5.76 33.28c-1.92 3.84-5.12 5.12-8.96 5.12h-94.72c-6.4 0-12.16-5.12-12.16-10.88l1.28-711.04c0-5.76 5.12-10.88 10.88-10.88h136.32c5.76 0 10.88 5.12 10.88 10.88v241.28s52.48-33.92 129.28-33.92l-0.64-1.28c76.8 0 190.08 28.8 190.08 248.32z m-558.08-231.04H2165.76c-7.04 0-10.88 5.12-10.88 12.16v348.16s-35.2 24.96-83.2 24.96-62.08-21.76-62.08-69.76V400c0-5.76-5.12-10.88-10.88-10.88h-136.96c-5.76 0-10.88 5.12-10.88 10.88v327.04c0 140.8 78.72 176 186.88 176 88.96 0 161.28-49.28 161.28-49.28s3.2 24.96 5.12 28.8c1.28 3.2 5.76 5.76 10.24 5.76h85.76c7.04 0 10.88-5.12 10.88-10.88l1.28-478.08c0-5.76-5.12-10.88-12.16-10.88z m-1516.8-0.64h-136.32c-5.76 0-10.88 5.76-10.88 12.8v469.76c0 12.8 8.32 17.28 19.2 17.28h122.88c12.8 0 16-5.76 16-17.28V398.72c0-5.76-5.12-10.88-10.88-10.88z m-67.2-216.32c-49.28 0-88.32 39.04-88.32 88.32 0 49.28 39.04 88.32 88.32 88.32 48 0 87.04-39.04 87.04-88.32 0-49.28-39.04-88.32-87.04-88.32z m1055.36-16h-135.04c-5.76 0-10.88 5.12-10.88 10.88v261.76h-211.84V166.4c0-5.76-5.12-10.88-10.88-10.88h-136.32c-5.76 0-10.88 5.12-10.88 10.88v711.04c0 5.76 5.76 10.88 10.88 10.88h136.32c5.76 0 10.88-5.12 10.88-10.88V573.44h211.84l-1.28 304c0 5.76 5.12 10.88 10.88 10.88h136.32c5.76 0 10.88-5.12 10.88-10.88V166.4c0-5.76-5.12-10.88-10.88-10.88zM563.84 470.4v367.36c0 2.56-0.64 7.04-3.84 8.32 0 0-80 56.96-211.84 56.96-159.36 0-348.16-49.92-348.16-378.88S165.12 127.36 326.4 128c139.52 0 195.84 31.36 204.8 37.12 2.56 3.2 3.84 5.76 3.84 8.96L508.16 288c0 5.76-5.76 12.8-12.8 10.88-23.04-7.04-57.6-21.12-138.88-21.12-94.08 0-195.2 26.88-195.2 238.72s96 236.8 165.12 236.8c58.88 0 80-7.04 80-7.04v-147.2H312.32c-7.04 0-12.16-5.12-12.16-10.88V470.4c0-5.76 5.12-10.88 12.16-10.88h239.36c7.04 0 12.16 5.12 12.16 10.88z</Geometry>
<Geometry x:Key="QqGeometry">M936.194300839506 691.6934192494618c-5.891587367822223-94.26540047423211-70.69904970840491-170.8560375504593-106.04857520987652-212.09715041975304 5.891587367822223-11.783174735644446 17.674762103466666-79.53643140740742-29.457938133649378-126.66913164452346V349.981342854005c0-182.63921228610366-129.61492468116543-315.1999312984493-294.57937486380246-315.1999312984493s-294.57937615834066 132.5607190123457-294.57937615834066 315.1999312984493v2.9457943311802466c-47.132700237116055 47.132700237116055-35.349525501471604 114.885956908879-29.45793683911111 126.66913164452346-35.349525501471604 41.24111286929382-100.15698784205432 117.83174994552098-106.04857520987652 212.09715041975304 0 23.56634947128889 2.9457943311802466 58.91587497276049 14.728969066824689 76.59063707622718 14.728969066824689 20.62055643464691 55.97008193611851-2.9457943311802466 82.48222444404936-64.80746234058272 8.837381699002469 29.457938133649378 26.51214380246913 73.64484403958517 67.75325667176295 126.66913164452346-70.69904970840491 14.728969066824689-88.37381310640988 85.42801877522965-64.80746234058272 123.72333731334321 17.674762103466666 26.51214380246913 53.02428760493826 47.132700237116055 120.77754298216297 47.132700237116055 114.885956908879 0 167.9102445138173-32.40373117029136 191.4765952796444-53.02428760493826 5.891587367822223-5.891587367822223 11.783174735644446-5.891587367822223 20.620555140108642-5.891587367822223 8.837381699002469 0 14.728969066824689 2.9457943311802466 20.62055643464691 5.891587367822223 23.56634947128889 20.62055643464691 73.64484403958517 53.02428760493826 191.4765939851062 53.02428760493826 64.80746234058272 0 103.10278087869627-20.62055643464691 120.77754427670124-47.132700237116055 23.56634947128889-38.29531853811359 2.9457943311802466-106.04857520987652-64.80746234058272-123.72333731334321 41.24111286929382-55.97008193611851 58.91587497276049-100.15698784205432 67.75325667176295-126.66913164452346 29.457938133649378 61.86166930394074 67.75325667176295 85.42801877522965 82.48222444404936 64.80746234058272 5.891587367822223-17.674762103466666 11.783174735644446-53.02428760493826 8.837381699002469-76.59063707622718z m0 0</Geometry>
<Geometry x:Key="ProjectGeometry">M838.4 325.12 554.24 479.36C528 493.44 512 521.6 512 552.96l0 298.24c0 32 31.36 53.12 57.6 38.4l284.16-154.24c25.6-14.08 42.24-42.24 42.24-73.6L896 364.16C896 331.52 864.64 311.04 838.4 325.12zM405.76 478.72 121.6 325.12C95.36 311.04 64 331.52 64 363.52l0 299.52c0 31.36 16 59.52 42.24 73.6l284.16 153.6C416.64 904.32 448 883.2 448 851.2L448 552.32C448 520.96 432 492.8 405.76 478.72zM812.16 255.36c13.44-7.04 19.84-19.2 18.56-30.72 1.28-12.16-5.12-23.68-18.56-30.72L522.88 42.88c-12.8-7.04-28.16-10.24-43.52-10.24-15.36 0-30.72 3.2-43.52 10.24L146.56 193.28C133.12 200.32 127.36 212.48 128 224 127.36 236.16 133.12 248.32 146.56 255.36l289.28 150.4c12.8 7.04 28.16 10.24 43.52 10.24 15.36 0 30.72-3.2 43.52-10.24L812.16 255.36z</Geometry>
<Geometry x:Key="BlogGeometry">M1137.575865 0l0 795.939663-267.130435 228.060337-870.44543 0 0-1024 1137.575865 0zM795.939663 682.363798l-626.030169 0 0 113.575865 626.030169 0 0-113.575865zM966.757764 455.212067l-796.84827 0 0 113.575865 796.84827 0 0-113.575865zM966.757764 227.15173l-796.84827 0 0 114.484472 796.84827 0 0-114.484472z</Geometry>
<Geometry x:Key="VisualStudioGeometry">M23.063,0L11,12L3,6L0,7v15l3,2l8-6l11.875,12L30,27V2.938L23.063,0z M3,19v-8l5,4L3,19z M23,21l-8-6l8-6V21z</Geometry>
<Geometry x:Key="CodeGeometry">M288.752 319.495c-12.497-12.497-32.758-12.497-45.255 0L73.619 489.372a32 32 0 0 0 0 45.254l169.878 169.879c6.249 6.248 14.438 9.372 22.627 9.372s16.379-3.124 22.627-9.372c12.497-12.497 12.497-32.759 0-45.255L141.502 512l147.25-147.25c12.497-12.497 12.497-32.758 0-45.255zM950.38 489.372L780.504 319.495c-12.498-12.497-32.759-12.497-45.255 0-12.497 12.497-12.497 32.758 0 45.255L882.499 512l-147.25 147.251c-12.496 12.496-12.496 32.758 0.001 45.255 6.248 6.248 14.438 9.372 22.627 9.372s16.379-3.124 22.628-9.373l169.877-169.878c12.496-12.497 12.496-32.758-0.002-45.255zM600.417 312.63c-16.289-6.858-35.052 0.785-41.91 17.074L415.451 669.46c-6.858 16.288 0.786 35.052 17.074 41.91a31.892 31.892 0 0 0 12.404 2.517c12.488 0 24.355-7.359 29.506-19.591L617.491 354.54c6.858-16.288-0.786-35.052-17.074-41.91z</Geometry>
<Geometry x:Key="WikiGeometry">M638.72 808.533333 529.493333 551.253333C485.973333 636.16 438.186667 725.333333 397.226667 808.533333 396.8 808.96 377.173333 808.533333 377.173333 808.533333 314.453333 661.333333 249.6 516.266667 186.453333 370.346667 171.946667 334.506667 120.746667 277.333333 85.333333 277.333333 85.333333 273.066667 85.333333 263.68 85.333333 258.133333L301.226667 258.133333 301.226667 277.333333C275.626667 277.333333 232.106667 294.4 243.2 322.133333 273.92 387.84 381.44 642.56 410.88 707.413333 430.933333 667.306667 487.68 561.493333 512 516.693333 492.8 479.146667 432.213333 338.346667 414.293333 303.36 400.64 280.32 366.08 277.333333 339.626667 277.333333 339.626667 270.933333 340.053333 266.666667 339.626667 258.56L529.92 258.986667 529.92 276.053333C503.893333 277.333333 479.573333 286.293333 490.666667 311.04 516.266667 363.946667 531.2 401.92 554.666667 450.986667 561.92 436.48 600.32 357.546667 618.666667 316.16 629.76 288.426667 613.12 277.333333 567.04 277.333333 567.466667 272.213333 567.466667 263.253333 567.466667 258.986667 626.773333 258.56 715.946667 258.56 731.733333 258.133333L731.733333 276.053333C701.44 277.333333 670.293333 293.546667 654.08 318.293333L576 482.133333C583.68 503.893333 659.626667 672.426667 667.733333 691.2L832 314.453333C819.2 283.733333 782.506667 277.333333 768 277.333333 768 271.786667 768 264.533333 768 258.133333L938.666667 259.413333 938.666667 260.266667 938.666667 277.333333C901.12 277.333333 877.653333 298.666667 864 330.666667 829.866667 407.04 725.333333 650.24 657.066667 808.533333 657.066667 808.533333 638.72 808.533333 638.72 808.533333Z</Geometry>
<Geometry x:Key="DocGeometry">M173.826977 510.432295c0-122.019031-0.050142-244.038062 0.022513-366.057093 0.032746-54.232159 27.618011-81.962733 81.740676-82.012875 117.26475-0.10847 234.532571-0.400113 351.790158 0.567935 10.968819 0.090051 24.65554 5.861498 32.362059 13.658068 66.276473 67.050092 131.747603 134.908596 196.58633 203.352431 7.161097 7.559163 12.495592 20.287045 12.535501 30.641881 0.738827 189.363835 0.623193 378.731764 0.480954 568.098669-0.036839 49.259914-28.894074 77.959559-78.538751 78.007655-172.727946 0.166799-345.455893 0.165776-518.183839 0.002047-50.561559-0.048095-78.714759-28.893051-78.760808-80.201623C173.752276 754.470357 173.826977 632.451326 173.826977 510.432295zM425.726078 715.13242c-0.409322 52.42193 32.43983 88.344071 81.254605 88.856747 48.829102 0.512676 83.016739-35.294854 83.205027-87.148849 0.190335-52.300156-32.965809-88.35942-81.524758-88.665389C459.317127 627.863844 426.136424 662.654208 425.726078 715.13242zM265.914302 633.581056c0 56.69935 0 110.830201 0 166.16446 23.783683 0 45.88505 0.218988 67.980277-0.049119 36.362162-0.441045 61.114916-17.009396 71.76958-47.599088 13.557784-38.924521 4.252861-85.525885-22.836101-104.649432-9.880021-6.974855-22.768563-12.386098-34.668591-13.255908C321.448106 632.240525 294.495244 633.581056 265.914302 633.581056zM758.306732 689.51088c-9.967002-45.812395-41.170678-66.920132-86.082564-60.683081-42.587957 5.913687-71.66418 46.171576-67.992557 94.137007 3.773953 49.296753 35.82902 80.999802 81.923848 81.025385 42.137703 0.023536 68.915579-25.63382 71.465658-69.621661-10.092869 0-20.128433 0-30.109762 0-16.044418 36.365232-36.768415 47.330982-62.482053 33.178657-19.942191-10.975982-28.691459-39.623439-21.979594-69.791529 4.77884-21.481244 16.022928-36.523845 39.027875-38.340213 21.590737-1.704828 35.721573 9.087982 40.968064 30.095435C735.017306 689.51088 745.964636 689.51088 758.306732 689.51088zM635.406634 159.644977c0 32.664957-0.671289 69.714781 0.62524 106.695021 0.230244 6.566556 8.422833 18.209734 13.30912 18.408255 37.929868 1.542122 75.950809 0.851391 113.944122 0.851391 1.113357-2.461051 2.226714-4.92108 3.340071-7.382131C722.585159 238.422158 678.54513 198.626803 635.406634 159.644977zM553.603537 717.1381c-0.353041 34.149774-17.751293 55.144948-45.725414 55.175647-29.049616 0.031722-45.502333-21.023826-44.98454-57.571207 0.49528-34.968419 17.328667-55.873542 44.977377-55.858192C535.765263 658.899698 553.965787 682.0827 553.603537 717.1381zM298.449299 770.413468c0-37.08564 0-71.501474 0-107.650789 25.056676-1.242294 50.77236-6.163373 66.627467 18.401092 13.642718 21.135366 14.034645 45.815465 2.095731 67.677379C352.412328 775.868713 325.439 771.676228 298.449299 770.413468z</Geometry>
<Geometry o:Freeze="True" x:Key="NewGeometry">M512 0h1216a512 512 0 1 1 0 1024H512A512 512 0 1 1 512 0zM420.16 311.04V768h74.88V433.92h2.56l228.48 334.08h72.96V311.04h-75.52v329.6h-2.56l-225.92-329.6h-74.88z m468.48 0V768h340.48v-64h-265.6V565.76h239.36v-64h-239.36V375.04h254.72v-64h-329.6z m369.28 0l131.2 456.96h80l89.6-343.68h2.56l88.96 343.68h79.36l131.84-456.96h-84.48l-85.76 347.52h-2.56l-90.24-347.52h-77.44l-90.24 347.52h-2.56l-85.76-347.52h-84.48z</Geometry>
<Geometry o:Freeze="True" x:Key="LogoGeometry">M40.493382,19.001303 C36.637875,19.06448 33.938568,21.421986 33.948524,25.271919 L34.068279,71.56765 34.066906,71.598007 34.068745,71.747833 34.18895,118.21758 C34.202225,123.35083 39.026951,129.19344 44.965271,131.2674 50.903587,133.34137 55.706783,130.86133 55.693504,125.72808 L55.589508,85.524513 93.866371,85.524513 93.950943,118.21758 C93.964218,123.35083 98.788948,129.19344 104.72726,131.2674 110.66558,133.34137 115.46878,130.86133 115.4555,125.72808 L115.33575,79.432381 115.33712,79.401993 115.33528,79.252007 115.21507,32.782413 C115.2018,27.64917 110.37708,21.806566 104.43876,19.732603 98.500435,17.658638 93.697243,20.138674 93.710518,25.271919 L93.814514,65.475487 55.537647,65.475487 55.453079,32.782413 C55.439804,27.64917 50.615082,21.806566 44.676762,19.732603 43.192181,19.214111 41.778549,18.980244 40.493382,19.001303 z M9.999999,0 L140,0 C145.52284,0 150,4.4771523 150,9.999999 L150,140 C150,145.52284 145.52284,150 140,150 L9.999999,150 C4.4771523,150 0,145.52284 0,140 L0,9.999999 C0,4.4771523 4.4771523,0 9.999999,0 z</Geometry>
<Geometry o:Freeze="True" x:Key="CirclePanelDemoGeometry">M28.677037,-2.2499313E-22 C38.75065,24.740243 38.50705,52.437974 27.999852,77.000001 L-1.7053028E-13,65.206651 C7.3550318,48.013234 7.5255431,28.624822 0.4740567,11.306663 z</Geometry>
<Geometry o:Freeze="True" x:Key="CirclePanelRightGeometry">M267.287478 892.162257c0 45.149912 59.597884 71.336861 93.008818 37.925926L740.458554 549.925926c21.671958-21.671958 21.671958-54.179894 0-75.851852L360.296296 93.911817c-33.410935-33.410935-93.008818-5.417989-93.008818 38.828924v759.421516z m0 0</Geometry>
<Geometry o:Freeze="True" x:Key="GithubGeometry">M512 0C229.12 0 0 229.12 0 512c0 226.56 146.56 417.92 350.08 485.76 25.6 4.48 35.2-10.88 35.2-24.32 0-12.16-0.64-52.48-0.64-95.36-128.64 23.68-161.92-31.36-172.16-60.16-5.76-14.72-30.72-60.16-52.48-72.32-17.92-9.6-43.52-33.28-0.64-33.92 40.32-0.64 69.12 37.12 78.72 52.48 46.08 77.44 119.68 55.68 149.12 42.24 4.48-33.28 17.92-55.68 32.64-68.48-113.92-12.8-232.96-56.96-232.96-252.8 0-55.68 19.84-101.76 52.48-137.6-5.12-12.8-23.04-65.28 5.12-135.68 0 0 42.88-13.44 140.8 52.48 40.96-11.52 84.48-17.28 128-17.28 43.52 0 87.04 5.76 128 17.28 97.92-66.56 140.8-52.48 140.8-52.48 28.16 70.4 10.24 122.88 5.12 135.68 32.64 35.84 52.48 81.28 52.48 137.6 0 196.48-119.68 240-233.6 252.8 18.56 16 34.56 46.72 34.56 94.72 0 68.48-0.64 123.52-0.64 140.8 0 13.44 9.6 29.44 35.2 24.32A512.832 512.832 0 0 0 1024 512c0-282.88-229.12-512-512-512z</Geometry>
<Geometry o:Freeze="True" x:Key="NugetGeometry">M449.722947 199.412211H706.021053c130.967579 0 237.136842 106.169263 237.136842 237.136842v256.298105c0 130.967579-106.169263 237.136842-237.136842 237.136842H449.722947c-130.965895 0-237.136842-106.169263-237.136842-237.136842V436.549053c0-130.967579 106.170947-237.136842 237.136842-237.136842z m-201.205894-21.557895c0-64.299789-70.085053-104.704-125.850948-72.55579s-55.764211 112.96 0 145.111579 125.850947-8.257684 125.850948-72.555789z m239.528421 234.74021c0-68.003368-74.088421-110.736842-133.037474-76.734315s-58.950737 119.467789 0 153.470315 133.039158-8.730947 133.039158-76.736zM835.368421 692.847158c0-117.596632-128.154947-191.494737-230.123789-132.695579s-101.970526 206.593684 0 265.391158S835.368421 810.443789 835.368421 692.847158z</Geometry>
<Geometry o:Freeze="True" x:Key="EmailGeometry">M430.079734 481.464543c45.196365 45.596478 118.486578 45.596478 163.68499 0l360.684736-324.939627c0.547469 3.751441 1.13894 7.490601 1.13894 11.401678l0 404.753417 0 116.754121c0 42.995233-34.547841 77.838809-77.145008 77.838809L145.397996 767.272941c-42.597167 0-77.145008-34.844599-77.145008-77.838809L68.252988 494.839155 68.252988 167.926594c0-3.911076 0.593518-7.65126 1.139963-11.401678L430.079734 481.464543zM910.960992 74.226538 562.044278 387.28558c-38.470173 38.811957-62.276369 38.811957-100.770078 0L112.538611 74.408687c10.011005-4.789073 21.069875-7.673773 32.859385-7.673773l733.044372 0C890.095779 66.735937 901.065622 69.539796 910.960992 74.226538z</Geometry>
<Geometry o:Freeze="True" x:Key="GitterGeometry">M260.8 645H160V0h100.8v645zM461.8 152.2h-100.8V1024h100.8V152.2z m201.2 0h-100.8V1024h100.8V152.2zM864 152h-100.8v494H864V152z</Geometry>
<Geometry o:Freeze="True" x:Key="WebsiteGeometry">M698.026667 597.333333C701.44 569.173333 704 541.013333 704 512 704 482.986667 701.44 454.826667 698.026667 426.666667L842.24 426.666667C849.066667 453.973333 853.333333 482.56 853.333333 512 853.333333 541.44 849.066667 570.026667 842.24 597.333333M622.506667 834.56C648.106667 787.2 667.733333 736 681.386667 682.666667L807.253333 682.666667C766.293333 753.066667 701.013333 807.68 622.506667 834.56M611.84 597.333333 412.16 597.333333C407.893333 569.173333 405.333333 541.013333 405.333333 512 405.333333 482.986667 407.893333 454.4 412.16 426.666667L611.84 426.666667C615.68 454.4 618.666667 482.986667 618.666667 512 618.666667 541.013333 615.68 569.173333 611.84 597.333333M512 851.626667C476.586667 800.426667 448 743.68 430.506667 682.666667L593.493333 682.666667C576 743.68 547.413333 800.426667 512 851.626667M341.333333 341.333333 216.746667 341.333333C257.28 270.506667 322.986667 215.893333 401.066667 189.44 375.466667 236.8 356.266667 288 341.333333 341.333333M216.746667 682.666667 341.333333 682.666667C356.266667 736 375.466667 787.2 401.066667 834.56 322.986667 807.68 257.28 753.066667 216.746667 682.666667M181.76 597.333333C174.933333 570.026667 170.666667 541.44 170.666667 512 170.666667 482.56 174.933333 453.973333 181.76 426.666667L325.973333 426.666667C322.56 454.826667 320 482.986667 320 512 320 541.013333 322.56 569.173333 325.973333 597.333333M512 171.946667C547.413333 223.146667 576 280.32 593.493333 341.333333L430.506667 341.333333C448 280.32 476.586667 223.146667 512 171.946667M807.253333 341.333333 681.386667 341.333333C667.733333 288 648.106667 236.8 622.506667 189.44 701.013333 216.32 766.293333 270.506667 807.253333 341.333333M512 85.333333C276.053333 85.333333 85.333333 277.333333 85.333333 512 85.333333 747.52 276.48 938.666667 512 938.666667 747.52 938.666667 938.666667 747.52 938.666667 512 938.666667 276.48 747.52 85.333333 512 85.333333Z</Geometry>
<Geometry o:Freeze="True" x:Key="FaceBookGeometry">m 41.416254,90 c -0.327378,-7.4702 0.20833,-32.7284 0,-39.901 -5.386902,-0.2083 -4.521603,0.3274 -9.848987,0 0.20833,-5.50595 0.36436,-7.66666 0.126269,-13.32142 4.646472,0.0181 3.439989,-0.009 9.848987,-0.1894 0.09586,-3.7736 0.133082,-3.0791 0.126269,-7.38674 0.18259,-3.73943 -0.486609,-10.54308 4.293149,-14.96288 4.779758,-4.4198 13.606811,-3.64808 22.223356,-3.53554 -0.04417,5.73754 -0.03936,9.37986 0,12.87945 -5.049924,0.46388 -7.309188,-0.33689 -10.85914,1.26269 -1.403378,3.17794 -1.569601,4.80531 -1.262691,11.93242 3.147964,-0.13336 8.201788,-0.1378 12.626907,0 -0.995158,6.00899 -0.948285,7.62376 -1.767767,13.06882 -3.676625,0.088 -5.605721,-0.1488 -11.111678,0 -0.148814,6.756 0.357147,33.0107 0,40.1536 -6.428576,0.1786 -8.174438,-0.03 -14.394674,0 z</Geometry>
<Geometry o:Freeze="True" x:Key="TwitterGeometry">m 10.44335,90 c 11.073313,0.3952 19.483106,-1.8358 23.901837,-7.1603 -7.9736,-1.4292 -11.832311,-4.1933 -15.078321,-11.0837 3.459698,0.8219 5.795894,0.6358 7.606781,-0.607 -7.19593,-1.719 -12.734543,-6.7971 -13.741664,-15.836 2.766355,1.55307 5.466848,2.66623 7.828682,2.0203 -4.336544,-2.92911 -9.838998,-10.47636 -5.555839,-22.47589 8.400675,11.87052 23.824269,17.67568 33.840111,17.67767 -0.936406,-9.74688 5.88057,-19.46521 15.302849,-19.97853 8.13118,-0.50719 10.57457,4.01944 12.476346,4.82624 3.644547,0.13419 7.393301,-1.74401 10.354063,-3.53553 -1.380842,4.47157 -5.06769,5.62903 -6.313453,8.58629 5.42317,0.41513 5.891376,-1.53111 8.333758,-2.0203 -2.071414,3.75017 -5.393863,5.00034 -7.323606,8.08122 -1.633654,16.12573 -5.16049,27.57123 -14.647212,36.36553 -13.825764,11.3764 -34.755458,17.369 -56.984332,5.14 z</Geometry>
<Geometry o:Freeze="True" x:Key="ThumbsUpGeometry">M68.191078 915.462005l161.384597 0L229.575676 431.30719 68.191078 431.30719 68.191078 915.462005zM955.808922 471.653083c0-44.582381-36.109406-80.69281-80.69281-80.69281L620.329241 390.960273 658.859789 206.578915c0.807389-4.034896 1.412163-8.271384 1.412163-12.709463 0-16.743336-6.859221-31.873941-17.752316-42.767036l-42.968627-42.565445L333.871043 374.216937c-14.524808 14.7264-23.602557 34.899858-23.602557 57.090253l0 403.462005c0 44.582381 36.109406 80.69281 80.69281 80.69281l363.116111 0c33.487695 0 62.133106-20.37505 74.236771-49.222051l121.643478-284.441261c3.63069-9.279341 5.850242-19.164478 5.850242-29.452799L955.807898 475.083206l-0.403183-0.403183L955.808922 471.653083z</Geometry>
<Geometry o:Freeze="True" x:Key="ImageGeometry">M736 224H288a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V288a64 64 0 0 0-64-64z m-416 160a64 64 0 1 1 128.032 0.032A64 64 0 0 1 320 384z m416 320a32 32 0 0 1-32 32H384a32 32 0 0 1-32-32l96-160c26.432-2.048 68.128 6.016 128 64l128-224a32 32 0 0 1 32 32v288z</Geometry>
<Geometry o:Freeze="True" x:Key="KeyboardGeometry">M19.692308 512A25 25 0 1 1 19.692308 531.692308ZM512 303.027832C512 286.548884 524.86564 273.174666 540.717948 273.174666L598.153846 273.174666C614.006154 273.174666 626.871794 286.548884 626.871794 303.027832L626.871794 362.734167C626.871794 379.213115 614.006154 392.587333 598.153846 392.587333L540.717948 392.587333C524.86564 392.587333 512 379.213115 512 362.734167L512 303.027832 512 303.027832ZM512 482.146834 512 541.853166C512 558.332115 499.13436 571.706335 483.282052 571.706335L425.846154 571.706335C409.993846 571.706335 397.128206 558.332115 397.128206 541.853166L397.128206 482.146834C397.128206 465.667885 409.993846 452.293665 425.846154 452.293665L483.282052 452.293665C499.13436 452.293665 512 465.667885 512 482.146834L512 482.146834ZM339.692308 303.027832C339.692308 286.548884 352.557948 273.174666 368.410256 273.174666L425.846154 273.174666C441.698462 273.174666 454.564102 286.548884 454.564102 303.027832L454.564102 362.734167C454.564102 379.213115 441.698462 392.587333 425.846154 392.587333L368.410256 392.587333C352.557948 392.587333 339.692308 379.213115 339.692308 362.734167L339.692308 303.027832 339.692308 303.027832ZM167.384615 303.027832C167.384615 286.548884 180.250256 273.174666 196.102564 273.174666L253.538462 273.174666C269.390769 273.174666 282.25641 286.548884 282.25641 303.027832L282.25641 362.734167C282.25641 379.213115 269.390769 392.587333 253.538462 392.587333L196.102564 392.587333C180.250256 392.587333 167.384615 379.213115 167.384615 362.734167L167.384615 303.027832 167.384615 303.027832ZM282.25641 720.972168C282.25641 737.451116 269.390769 750.825334 253.538462 750.825334L196.102564 750.825334C180.250256 750.825334 167.384615 737.451116 167.384615 720.972168L167.384615 661.265833C167.384615 644.786885 180.250256 631.412667 196.102564 631.412667L253.538462 631.412667C269.390769 631.412667 282.25641 644.786885 282.25641 661.265833L282.25641 720.972168 282.25641 720.972168ZM310.97436 571.706335 253.538462 571.706335C237.686154 571.706335 224.820513 558.332115 224.820513 541.853166L224.820513 482.146834C224.820513 465.667885 237.686154 452.293665 253.538462 452.293665L310.97436 452.293665C326.826667 452.293665 339.692308 465.667885 339.692308 482.146834L339.692308 541.853166C339.692308 558.332115 326.826667 571.706335 310.97436 571.706335L310.97436 571.706335ZM569.435898 720.972168C569.435898 737.451116 556.570256 750.825334 540.717948 750.825334L368.410256 750.825334C352.557948 750.825334 339.692308 737.451116 339.692308 720.972168L339.692308 661.265833C339.692308 644.786885 352.557948 631.412667 368.410256 631.412667L540.717948 631.412667C556.570256 631.412667 569.435898 644.786885 569.435898 661.265833L569.435898 720.972168 569.435898 720.972168ZM569.435898 541.853166 569.435898 482.146834C569.435898 465.667885 582.301538 452.293665 598.153846 452.293665L655.589744 452.293665C671.442052 452.293665 684.307692 465.667885 684.307692 482.146834L684.307692 541.853166C684.307692 558.332115 671.442052 571.706335 655.589744 571.706335L598.153846 571.706335C582.301538 571.706335 569.435898 558.332115 569.435898 541.853166L569.435898 541.853166ZM856.615385 720.972168C856.615385 737.451116 843.749744 750.825334 827.897437 750.825334L655.589744 750.825334C639.737437 750.825334 626.871794 737.451116 626.871794 720.972168L626.871794 661.265833C626.871794 644.786885 639.737437 631.412667 655.589744 631.412667L713.02564 631.412667C728.877948 631.412667 741.74359 618.038449 741.74359 601.559501L741.74359 482.146834C741.74359 465.667885 754.609231 452.293665 770.461538 452.293665L827.897437 452.293665C843.749744 452.293665 856.615385 465.667885 856.615385 482.146834L856.615385 720.972168 856.615385 720.972168ZM856.615385 362.734167C856.615385 379.213115 843.749744 392.587333 827.897437 392.587333L713.02564 392.587333C697.173333 392.587333 684.307692 379.213115 684.307692 362.734167L684.307692 303.027832C684.307692 286.548884 697.173333 273.174666 713.02564 273.174666L827.897437 273.174666C843.749744 273.174666 856.615385 286.548884 856.615385 303.027832L856.615385 362.734167 856.615385 362.734167Z</Geometry>
<Geometry o:Freeze="True" x:Key="LoveGeometry">M890.2 208.2c-91.8-91.9-242.1-91.9-334 0L544.4 220c-18.2 18.2-47.6 18.2-65.8 0l-11.8-11.8c-91.9-91.9-242.1-91.9-334 0C41 300 24.7 533.9 203.6 722.1 304 827.8 412.4 882.3 470 905.9c26.6 10.9 56.5 10.9 83 0 57.6-23.6 166-78.1 266.4-183.8 178.9-188.2 162.6-422 70.8-513.9z</Geometry>
<Geometry o:Freeze="True" x:Key="CnblogsGeometry">M512 0C229.234472 0 0 229.226146 0 512 0 794.765528 229.234472 1024 512 1024S1024 794.765528 1024 512C1024 229.226146 794.765528 0 512 0zM228.776585 836.066862c-63.163317 0-114.371642-51.208325-114.371642-114.371642S165.613268 607.323577 228.776585 607.323577s114.371642 51.208325 114.371643 114.371643c0 63.171642-51.208325 114.371642-114.371643 114.371642z m420.555968-89.612488a391.867317 391.867317 0 0 1-1.989724 16.975089c-7.259577 30.203837-33.950179 52.898341-66.376845 52.898342-38.104455 0-68.990959-34.158309-68.99096-72.204488 0-5.877593 0.81587-11.463805 2.206179-16.775284-1.756618-131.096976-103.981789-237.867707-233.205593-246.883903l-6.343805-0.740943-1.015675-0.041626c-5.453008-0.216455-10.930992-0.732618-16.142569-2.331057a67.958634 67.958634 0 0 1-47.91987-65.078114c0-37.604943 30.245463-68.091837 67.550699-68.091837 0.299707 0 0.591089 0.041626 0.890797 0.049951l0.124878-0.049951c205.707447 2.139577 371.836878 169.484488 371.836878 375.699772 0 7.717463-0.341333 15.34335-0.824195 22.94426 0.066602 1.207154 0.19148 2.397659 0.199805 3.629789z m254.085203-63.329821c-10.856065 45.172553-25.80813 104.114992-74.310764 104.114992-56.994341 0-48.236228-66.085463-48.236228-122.996553 0-8.791415 1.223805-17.149919 3.296781-25.100488-2.639089-196.108488-169.834146-387.812943-363.137041-401.291447l-35.806699-5.827642c-42.117203-7.492683-111.715902-3.255154-111.715903-49.193626 0-56.253398 50.234276-81.861724 106.038114-81.861724 0.449561 0 0.882472 0.058276 1.332033 0.066602l0.183154-0.066602c307.724488 3.180228 526.252748 208.546341 526.252748 517.028423a538.474146 538.474146 0 0 1-1.23213 34.316488c0.108228 1.806569 0.291382 3.596488 0.308033 5.428032a542.72 542.72 0 0 1-2.972098 25.383545z</Geometry>
<Geometry o:Freeze="True" x:Key="ConfigGeometry">M827.904 541.184a278.592 278.592 0 0 0 0-58.368l73.728-58.368c15.872-13.056 20.224-35.584 9.728-53.504l-78.592-137.728c-9.984-17.408-31.232-25.856-51.712-18.176l-86.528 35.072c-15.872-11.52-32.512-21.248-49.664-29.184l-12.8-92.928c-3.072-20.224-20.736-35.584-41.216-35.584h-157.44c-20.736 0-38.144 14.848-41.216 35.84L378.88 221.44c-17.152 7.936-33.792 17.92-49.664 29.184L242.688 215.296c-18.688-7.168-41.216 0.768-51.2 18.176L112.64 371.2c-10.24 17.92-6.144 40.448 10.24 53.76l73.472 58.112c-1.024 9.472-1.536 19.2-1.536 29.184 0 9.728 0.512 19.456 1.536 29.184l-73.984 58.368c-15.872 13.056-19.968 35.584-9.728 53.248l78.848 137.728c9.984 17.408 32 25.856 51.456 17.92l86.528-35.072c15.872 11.52 32.512 21.248 49.664 29.184l13.056 93.696c3.328 20.48 20.48 35.328 41.216 35.328h157.44c20.48 0 38.144-15.36 41.216-35.84l13.056-93.184c17.152-7.936 33.792-17.664 49.664-29.184l86.784 35.328c4.864 1.792 9.984 2.816 15.104 2.816 14.848 0 28.672-7.936 36.096-20.992l78.592-137.728c10.24-17.664 6.4-40.192-9.984-53.76l-73.472-58.112z m-25.344 231.168l-99.584-40.448c-7.424-3.072-15.872-1.792-22.272 3.072-19.712 15.36-40.704 27.648-62.464 36.608-7.424 3.072-12.544 9.728-13.568 17.664l-14.592 104.96-155.392 2.304-15.104-107.264c-1.024-7.936-6.4-14.592-13.568-17.664-21.76-8.96-42.752-21.504-62.464-36.608-4.096-3.072-8.96-4.608-13.824-4.608-2.816 0-5.888 0.512-8.448 1.536l-96.256 41.472-80.896-137.216 84.48-66.816c6.144-4.864 9.472-12.8 8.448-20.48-1.536-12.032-2.56-24.32-2.56-36.608 0-12.288 1.024-24.576 2.56-36.608 1.024-7.936-2.048-15.616-8.448-20.48l-83.712-64 76.544-139.264 99.584 40.448c7.424 3.072 15.872 1.792 22.272-3.072 19.712-15.36 40.96-27.648 62.72-36.864 7.424-3.072 12.544-9.728 13.568-17.664l12.544-104.704 157.696-2.304 15.104 107.264c1.024 7.936 6.4 14.592 13.568 17.664 21.76 8.96 42.752 21.504 62.464 36.864 6.4 4.864 14.848 6.144 22.272 3.072l96.256-41.472 80.896 137.216-84.48 66.816c-6.144 4.864-9.472 12.544-8.448 20.48 1.536 12.032 2.56 24.32 2.56 36.608 0 12.288-1.024 24.576-2.56 36.608-1.024 7.936 2.304 15.616 8.448 20.48l83.712 63.744-77.056 139.264zM512 345.6c-91.136 0-165.12 74.752-165.12 166.4s73.984 166.4 165.12 166.4 165.12-74.752 165.12-166.4-73.984-166.4-165.12-166.4z m0 297.216c-71.168 0-129.28-58.624-129.28-130.816 0-72.192 58.112-130.816 129.28-130.816s129.28 58.624 129.28 130.816c0 72.192-57.856 130.816-129.28 130.816z</Geometry>
<Geometry o:Freeze="True" x:Key="ContributorsGeometry">M657.486769 287.744c5.671385 0 11.264-5.671385 16.935385-5.671385l186.289231-124.140307c5.592615-5.592615 16.935385-16.935385 16.935384-28.199385V73.334154A74.673231 74.673231 0 0 0 804.233846 0H606.680615v220.002462c0 22.606769-16.935385 33.870769-39.463384 33.870769H454.262154c-22.528 0-39.463385-16.935385-39.463385-33.870769V5.671385H222.838154c-45.134769 0-79.005538 33.870769-79.005539 73.255384v56.477539c0 11.264 5.671385 22.528 16.935385 28.199384l186.289231 124.140308h16.935384C200.310154 349.735385 98.697846 507.746462 121.304615 693.878154c22.528 169.275077 169.353846 310.350769 344.221539 327.207384 237.095385 28.199385 440.32-152.339692 440.32-377.934769 0-158.011077-101.612308-299.008-248.359385-355.406769z m-146.747077 671.271385C335.793231 959.015385 189.046154 818.018462 189.046154 643.150769c0-174.867692 146.747077-310.350769 321.693538-310.350769 174.946462 0 321.693538 141.075692 321.693539 315.943385s-146.747077 310.350769-321.693539 310.350769zM670.798769 572.967385l-68.371692-11.185231a31.507692 31.507692 0 0 1-28.514462-16.777846l-28.514461-55.926154c-17.092923-27.963077-51.278769-27.963077-68.371692 0l-28.514462 55.926154a31.507692 31.507692 0 0 1-28.514462 16.777846l-68.371692 11.185231c-28.514462 5.592615-39.936 39.148308-17.092923 61.44l45.528615 39.227077c5.750154 11.185231 17.171692 22.370462 11.421539 33.555692l-11.421539 67.111384c-5.671385 27.963077 28.514462 50.333538 51.357539 33.555693l62.700308-27.963077a37.021538 37.021538 0 0 1 34.185846 0l62.700307 33.555692c28.514462 16.777846 57.028923-5.592615 51.27877-33.555692l-11.421539-67.111385c0-16.777846 5.750154-27.963077 11.421539-33.555692l51.278769-44.740923a38.596923 38.596923 0 0 0-22.843077-61.518769z</Geometry>
<Geometry o:Freeze="True" x:Key="GitHubStrGeometry">M1185.92 769.92h-1.28c0.576 0 0.96 0.64 1.536 0.704h0.384l-0.64-0.64z m0.256 0.704c-5.952 0.064-20.928 3.2-36.736 3.2-49.92 0-67.2-23.04-67.2-53.12V520.32h101.76c5.76 0 10.24-5.12 10.24-12.16v-108.8c0-5.76-5.12-10.88-10.24-10.88h-101.76V253.44c0-5.12-3.2-8.32-8.96-8.32h-138.24c-5.76 0-8.96 3.2-8.96 8.32v138.88s-69.76 17.28-74.24 17.92c-5.12 1.28-8.32 5.76-8.32 10.88v87.04c0 7.04 5.12 12.16 10.88 12.16h71.04v209.92c0 156.16 108.8 172.16 183.04 172.16 33.92 0 74.88-10.88 81.28-14.08 3.84-1.28 5.76-5.76 5.76-10.24v-96a11.328 11.328 0 0 0-9.344-11.52z m1516.544-140.8c0-115.84-46.72-131.2-96-126.08-38.4 2.56-69.12 21.76-69.12 21.76v225.28s31.36 21.76 78.08 23.04c65.92 1.92 87.04-21.76 87.04-144z m155.52-10.24c0 219.52-71.04 282.24-195.2 282.24-104.96 0-161.28-53.12-161.28-53.12s-2.56 29.44-5.76 33.28c-1.92 3.84-5.12 5.12-8.96 5.12h-94.72c-6.4 0-12.16-5.12-12.16-10.88l1.28-711.04c0-5.76 5.12-10.88 10.88-10.88h136.32c5.76 0 10.88 5.12 10.88 10.88v241.28s52.48-33.92 129.28-33.92l-0.64-1.28c76.8 0 190.08 28.8 190.08 248.32z m-558.08-231.04H2165.76c-7.04 0-10.88 5.12-10.88 12.16v348.16s-35.2 24.96-83.2 24.96-62.08-21.76-62.08-69.76V400c0-5.76-5.12-10.88-10.88-10.88h-136.96c-5.76 0-10.88 5.12-10.88 10.88v327.04c0 140.8 78.72 176 186.88 176 88.96 0 161.28-49.28 161.28-49.28s3.2 24.96 5.12 28.8c1.28 3.2 5.76 5.76 10.24 5.76h85.76c7.04 0 10.88-5.12 10.88-10.88l1.28-478.08c0-5.76-5.12-10.88-12.16-10.88z m-1516.8-0.64h-136.32c-5.76 0-10.88 5.76-10.88 12.8v469.76c0 12.8 8.32 17.28 19.2 17.28h122.88c12.8 0 16-5.76 16-17.28V398.72c0-5.76-5.12-10.88-10.88-10.88z m-67.2-216.32c-49.28 0-88.32 39.04-88.32 88.32 0 49.28 39.04 88.32 88.32 88.32 48 0 87.04-39.04 87.04-88.32 0-49.28-39.04-88.32-87.04-88.32z m1055.36-16h-135.04c-5.76 0-10.88 5.12-10.88 10.88v261.76h-211.84V166.4c0-5.76-5.12-10.88-10.88-10.88h-136.32c-5.76 0-10.88 5.12-10.88 10.88v711.04c0 5.76 5.76 10.88 10.88 10.88h136.32c5.76 0 10.88-5.12 10.88-10.88V573.44h211.84l-1.28 304c0 5.76 5.12 10.88 10.88 10.88h136.32c5.76 0 10.88-5.12 10.88-10.88V166.4c0-5.76-5.12-10.88-10.88-10.88zM563.84 470.4v367.36c0 2.56-0.64 7.04-3.84 8.32 0 0-80 56.96-211.84 56.96-159.36 0-348.16-49.92-348.16-378.88S165.12 127.36 326.4 128c139.52 0 195.84 31.36 204.8 37.12 2.56 3.2 3.84 5.76 3.84 8.96L508.16 288c0 5.76-5.76 12.8-12.8 10.88-23.04-7.04-57.6-21.12-138.88-21.12-94.08 0-195.2 26.88-195.2 238.72s96 236.8 165.12 236.8c58.88 0 80-7.04 80-7.04v-147.2H312.32c-7.04 0-12.16-5.12-12.16-10.88V470.4c0-5.76 5.12-10.88 12.16-10.88h239.36c7.04 0 12.16 5.12 12.16 10.88z</Geometry>
<Geometry o:Freeze="True" x:Key="QqGeometry">M936.194300839506 691.6934192494618c-5.891587367822223-94.26540047423211-70.69904970840491-170.8560375504593-106.04857520987652-212.09715041975304 5.891587367822223-11.783174735644446 17.674762103466666-79.53643140740742-29.457938133649378-126.66913164452346V349.981342854005c0-182.63921228610366-129.61492468116543-315.1999312984493-294.57937486380246-315.1999312984493s-294.57937615834066 132.5607190123457-294.57937615834066 315.1999312984493v2.9457943311802466c-47.132700237116055 47.132700237116055-35.349525501471604 114.885956908879-29.45793683911111 126.66913164452346-35.349525501471604 41.24111286929382-100.15698784205432 117.83174994552098-106.04857520987652 212.09715041975304 0 23.56634947128889 2.9457943311802466 58.91587497276049 14.728969066824689 76.59063707622718 14.728969066824689 20.62055643464691 55.97008193611851-2.9457943311802466 82.48222444404936-64.80746234058272 8.837381699002469 29.457938133649378 26.51214380246913 73.64484403958517 67.75325667176295 126.66913164452346-70.69904970840491 14.728969066824689-88.37381310640988 85.42801877522965-64.80746234058272 123.72333731334321 17.674762103466666 26.51214380246913 53.02428760493826 47.132700237116055 120.77754298216297 47.132700237116055 114.885956908879 0 167.9102445138173-32.40373117029136 191.4765952796444-53.02428760493826 5.891587367822223-5.891587367822223 11.783174735644446-5.891587367822223 20.620555140108642-5.891587367822223 8.837381699002469 0 14.728969066824689 2.9457943311802466 20.62055643464691 5.891587367822223 23.56634947128889 20.62055643464691 73.64484403958517 53.02428760493826 191.4765939851062 53.02428760493826 64.80746234058272 0 103.10278087869627-20.62055643464691 120.77754427670124-47.132700237116055 23.56634947128889-38.29531853811359 2.9457943311802466-106.04857520987652-64.80746234058272-123.72333731334321 41.24111286929382-55.97008193611851 58.91587497276049-100.15698784205432 67.75325667176295-126.66913164452346 29.457938133649378 61.86166930394074 67.75325667176295 85.42801877522965 82.48222444404936 64.80746234058272 5.891587367822223-17.674762103466666 11.783174735644446-53.02428760493826 8.837381699002469-76.59063707622718z m0 0</Geometry>
<Geometry o:Freeze="True" x:Key="ProjectGeometry">M838.4 325.12 554.24 479.36C528 493.44 512 521.6 512 552.96l0 298.24c0 32 31.36 53.12 57.6 38.4l284.16-154.24c25.6-14.08 42.24-42.24 42.24-73.6L896 364.16C896 331.52 864.64 311.04 838.4 325.12zM405.76 478.72 121.6 325.12C95.36 311.04 64 331.52 64 363.52l0 299.52c0 31.36 16 59.52 42.24 73.6l284.16 153.6C416.64 904.32 448 883.2 448 851.2L448 552.32C448 520.96 432 492.8 405.76 478.72zM812.16 255.36c13.44-7.04 19.84-19.2 18.56-30.72 1.28-12.16-5.12-23.68-18.56-30.72L522.88 42.88c-12.8-7.04-28.16-10.24-43.52-10.24-15.36 0-30.72 3.2-43.52 10.24L146.56 193.28C133.12 200.32 127.36 212.48 128 224 127.36 236.16 133.12 248.32 146.56 255.36l289.28 150.4c12.8 7.04 28.16 10.24 43.52 10.24 15.36 0 30.72-3.2 43.52-10.24L812.16 255.36z</Geometry>
<Geometry o:Freeze="True" x:Key="BlogGeometry">M1137.575865 0l0 795.939663-267.130435 228.060337-870.44543 0 0-1024 1137.575865 0zM795.939663 682.363798l-626.030169 0 0 113.575865 626.030169 0 0-113.575865zM966.757764 455.212067l-796.84827 0 0 113.575865 796.84827 0 0-113.575865zM966.757764 227.15173l-796.84827 0 0 114.484472 796.84827 0 0-114.484472z</Geometry>
<Geometry o:Freeze="True" x:Key="VisualStudioGeometry">M23.063,0L11,12L3,6L0,7v15l3,2l8-6l11.875,12L30,27V2.938L23.063,0z M3,19v-8l5,4L3,19z M23,21l-8-6l8-6V21z</Geometry>
<Geometry o:Freeze="True" x:Key="CodeGeometry">M288.752 319.495c-12.497-12.497-32.758-12.497-45.255 0L73.619 489.372a32 32 0 0 0 0 45.254l169.878 169.879c6.249 6.248 14.438 9.372 22.627 9.372s16.379-3.124 22.627-9.372c12.497-12.497 12.497-32.759 0-45.255L141.502 512l147.25-147.25c12.497-12.497 12.497-32.758 0-45.255zM950.38 489.372L780.504 319.495c-12.498-12.497-32.759-12.497-45.255 0-12.497 12.497-12.497 32.758 0 45.255L882.499 512l-147.25 147.251c-12.496 12.496-12.496 32.758 0.001 45.255 6.248 6.248 14.438 9.372 22.627 9.372s16.379-3.124 22.628-9.373l169.877-169.878c12.496-12.497 12.496-32.758-0.002-45.255zM600.417 312.63c-16.289-6.858-35.052 0.785-41.91 17.074L415.451 669.46c-6.858 16.288 0.786 35.052 17.074 41.91a31.892 31.892 0 0 0 12.404 2.517c12.488 0 24.355-7.359 29.506-19.591L617.491 354.54c6.858-16.288-0.786-35.052-17.074-41.91z</Geometry>
<Geometry o:Freeze="True" x:Key="WikiGeometry">M638.72 808.533333 529.493333 551.253333C485.973333 636.16 438.186667 725.333333 397.226667 808.533333 396.8 808.96 377.173333 808.533333 377.173333 808.533333 314.453333 661.333333 249.6 516.266667 186.453333 370.346667 171.946667 334.506667 120.746667 277.333333 85.333333 277.333333 85.333333 273.066667 85.333333 263.68 85.333333 258.133333L301.226667 258.133333 301.226667 277.333333C275.626667 277.333333 232.106667 294.4 243.2 322.133333 273.92 387.84 381.44 642.56 410.88 707.413333 430.933333 667.306667 487.68 561.493333 512 516.693333 492.8 479.146667 432.213333 338.346667 414.293333 303.36 400.64 280.32 366.08 277.333333 339.626667 277.333333 339.626667 270.933333 340.053333 266.666667 339.626667 258.56L529.92 258.986667 529.92 276.053333C503.893333 277.333333 479.573333 286.293333 490.666667 311.04 516.266667 363.946667 531.2 401.92 554.666667 450.986667 561.92 436.48 600.32 357.546667 618.666667 316.16 629.76 288.426667 613.12 277.333333 567.04 277.333333 567.466667 272.213333 567.466667 263.253333 567.466667 258.986667 626.773333 258.56 715.946667 258.56 731.733333 258.133333L731.733333 276.053333C701.44 277.333333 670.293333 293.546667 654.08 318.293333L576 482.133333C583.68 503.893333 659.626667 672.426667 667.733333 691.2L832 314.453333C819.2 283.733333 782.506667 277.333333 768 277.333333 768 271.786667 768 264.533333 768 258.133333L938.666667 259.413333 938.666667 260.266667 938.666667 277.333333C901.12 277.333333 877.653333 298.666667 864 330.666667 829.866667 407.04 725.333333 650.24 657.066667 808.533333 657.066667 808.533333 638.72 808.533333 638.72 808.533333Z</Geometry>
<Geometry o:Freeze="True" x:Key="DocGeometry">M173.826977 510.432295c0-122.019031-0.050142-244.038062 0.022513-366.057093 0.032746-54.232159 27.618011-81.962733 81.740676-82.012875 117.26475-0.10847 234.532571-0.400113 351.790158 0.567935 10.968819 0.090051 24.65554 5.861498 32.362059 13.658068 66.276473 67.050092 131.747603 134.908596 196.58633 203.352431 7.161097 7.559163 12.495592 20.287045 12.535501 30.641881 0.738827 189.363835 0.623193 378.731764 0.480954 568.098669-0.036839 49.259914-28.894074 77.959559-78.538751 78.007655-172.727946 0.166799-345.455893 0.165776-518.183839 0.002047-50.561559-0.048095-78.714759-28.893051-78.760808-80.201623C173.752276 754.470357 173.826977 632.451326 173.826977 510.432295zM425.726078 715.13242c-0.409322 52.42193 32.43983 88.344071 81.254605 88.856747 48.829102 0.512676 83.016739-35.294854 83.205027-87.148849 0.190335-52.300156-32.965809-88.35942-81.524758-88.665389C459.317127 627.863844 426.136424 662.654208 425.726078 715.13242zM265.914302 633.581056c0 56.69935 0 110.830201 0 166.16446 23.783683 0 45.88505 0.218988 67.980277-0.049119 36.362162-0.441045 61.114916-17.009396 71.76958-47.599088 13.557784-38.924521 4.252861-85.525885-22.836101-104.649432-9.880021-6.974855-22.768563-12.386098-34.668591-13.255908C321.448106 632.240525 294.495244 633.581056 265.914302 633.581056zM758.306732 689.51088c-9.967002-45.812395-41.170678-66.920132-86.082564-60.683081-42.587957 5.913687-71.66418 46.171576-67.992557 94.137007 3.773953 49.296753 35.82902 80.999802 81.923848 81.025385 42.137703 0.023536 68.915579-25.63382 71.465658-69.621661-10.092869 0-20.128433 0-30.109762 0-16.044418 36.365232-36.768415 47.330982-62.482053 33.178657-19.942191-10.975982-28.691459-39.623439-21.979594-69.791529 4.77884-21.481244 16.022928-36.523845 39.027875-38.340213 21.590737-1.704828 35.721573 9.087982 40.968064 30.095435C735.017306 689.51088 745.964636 689.51088 758.306732 689.51088zM635.406634 159.644977c0 32.664957-0.671289 69.714781 0.62524 106.695021 0.230244 6.566556 8.422833 18.209734 13.30912 18.408255 37.929868 1.542122 75.950809 0.851391 113.944122 0.851391 1.113357-2.461051 2.226714-4.92108 3.340071-7.382131C722.585159 238.422158 678.54513 198.626803 635.406634 159.644977zM553.603537 717.1381c-0.353041 34.149774-17.751293 55.144948-45.725414 55.175647-29.049616 0.031722-45.502333-21.023826-44.98454-57.571207 0.49528-34.968419 17.328667-55.873542 44.977377-55.858192C535.765263 658.899698 553.965787 682.0827 553.603537 717.1381zM298.449299 770.413468c0-37.08564 0-71.501474 0-107.650789 25.056676-1.242294 50.77236-6.163373 66.627467 18.401092 13.642718 21.135366 14.034645 45.815465 2.095731 67.677379C352.412328 775.868713 325.439 771.676228 298.449299 770.413468z</Geometry>
</ResourceDictionary>
@@ -34,6 +34,10 @@
</Setter>
</Style>
<Style x:Key="TabItemTransparent" BasedOn="{StaticResource TabItemInLine}" TargetType="TabItem">
<Setter Property="Background" Value="Transparent"/>
</Style>
<Style x:Key="ListBoxItemTransparent" BasedOn="{StaticResource ListBoxItemBaseStyle}" TargetType="ListBoxItem">
<Setter Property="Background" Value="Transparent"/>
</Style>
@@ -16,7 +16,7 @@
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ListBox ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.CanContentScroll="False" Background="Transparent" hc:ChatBubble.MaxWidth="300" BorderThickness="0" Style="{StaticResource StackPanelVerticalListBox}" ItemsSource="{Binding ChatInfos}">
<ListBox Name="ListBoxChat" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.CanContentScroll="False" Background="Transparent" hc:ChatBubble.MaxWidth="300" BorderThickness="0" Style="{StaticResource StackPanelVerticalListBox}" ItemsSource="{Binding ChatInfos}">
<hc:Interaction.Triggers>
<hc:RoutedEventTrigger RoutedEvent="hc:ChatBubble.Selected">
<hc:EventToCommand Command="{Binding ReadMessageCmd}" PassEventArgsToCommand="True" />
@@ -1,10 +1,27 @@
namespace HandyControlDemo.UserControl
using System.Windows.Controls;
using HandyControl.Tools;
namespace HandyControlDemo.UserControl
{
public partial class ChatBox
{
private ScrollViewer _scrollViewer;
public ChatBox()
{
InitializeComponent();
ListBoxChat.ItemContainerGenerator.ItemsChanged += ItemContainerGenerator_ItemsChanged;
}
private void ItemContainerGenerator_ItemsChanged(object sender, System.Windows.Controls.Primitives.ItemsChangedEventArgs e)
{
if (_scrollViewer == null)
{
_scrollViewer = VisualHelper.GetChild<ScrollViewer>(ListBoxChat);
}
_scrollViewer?.ScrollToBottom();
}
}
}
@@ -7,7 +7,7 @@
<hc:TransitioningContentControl>
<StackPanel Margin="32" Orientation="Horizontal">
<StackPanel>
<hc:NumericUpDown/>
<hc:NumericUpDown Maximum="100"/>
<hc:NumericUpDown Margin="0,32,0,0" IsEnabled="False"/>
<hc:NumericUpDown Margin="0,32,0,0" IsReadOnly="True"/>
@@ -13,8 +13,7 @@
<hc:PasswordBox ShowEyeButton="True" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
<hc:PasswordBox ShowClearButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" Margin="0,32,0,0" Password="123456"/>
<!--<hc:PasswordBox ShowClearButton="True" ShowEyeButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>-->
<hc:PasswordBox ShowClearButton="True" ShowEyeButton="True" Width="380" hc:InfoElement.TitleWidth="140" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" hc:InfoElement.Necessary="True" Margin="0,32,0,0"/>
</StackPanel>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,7 +1,12 @@
<UserControl x:Class="HandyControlDemo.UserControl.PinBoxDemoCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource RegionBrush}">
<userControl:UnderConstruction/>
<hc:TransitioningContentControl>
<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>
</hc:TransitioningContentControl>
</UserControl>
@@ -1,4 +1,7 @@
namespace HandyControlDemo.UserControl
using System.Windows;
using HandyControl.Controls;
namespace HandyControlDemo.UserControl
{
public partial class PinBoxDemoCtl
{
@@ -6,5 +9,13 @@
{
InitializeComponent();
}
private void PinBox_OnCompleted(object sender, RoutedEventArgs e)
{
if (e.OriginalSource is PinBox pinBox)
{
Growl.Info(pinBox.Password);
}
}
}
}
@@ -8,14 +8,14 @@
<UserControl.Resources>
<Style x:Key="Button4PoptipStyle" BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
<Setter Property="Width" Value="{x:Static system:Double.NaN}"/>
<Setter Property="Height" Value="50"/>
<Setter Property="Height" Value="40"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="Content" Value="{Binding Tag,RelativeSource={RelativeSource Self},Converter={StaticResource Int2StringConverter},ConverterParameter={x:Static langs:Lang.PoptipPositionStr}}"/>
</Style>
<Style x:Key="ToggleButton4PoptipStyle" BasedOn="{StaticResource {x:Type ToggleButton}}" TargetType="ToggleButton">
<Setter Property="Width" Value="{x:Static system:Double.NaN}"/>
<Setter Property="Height" Value="50"/>
<Setter Property="Height" Value="40"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="Content" Value="{Binding Tag,RelativeSource={RelativeSource Self},Converter={StaticResource Int2StringConverter},ConverterParameter={x:Static langs:Lang.PoptipPositionStr}}"/>
@@ -8,14 +8,14 @@
<StackPanel>
<hc:RangeSlider Width="400" IsSnapToTickEnabled="True" ValueStart="2" ValueEnd="8"/>
<hc:RangeSlider Width="400" IsSnapToTickEnabled="True" ValueEnd="3" Margin="0,32,0,0" IsEnabled="False"/>
<hc:RangeSlider Width="400" hc:TipElement.Visibility="Visible" IsSnapToTickEnabled="True" Maximum="100" ValueEnd="60" TickFrequency="10" TickPlacement="BottomRight" Margin="0,32,0,0"/>
<hc:RangeSlider Width="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="BottomRight" IsSnapToTickEnabled="True" ValueEnd="5" TickPlacement="Both" Margin="0,32,0,0"/>
<hc:RangeSlider Width="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Top" IsSnapToTickEnabled="True" Maximum="100" ValueEnd="60" TickFrequency="10" TickPlacement="BottomRight" Margin="0,32,0,0"/>
<hc:RangeSlider Width="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Bottom" hc:TipElement.StringFormat="#0.00" ValueEnd="5" TickPlacement="Both" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel Margin="32,0,0,0" Orientation="Horizontal">
<hc:RangeSlider Height="400" IsSnapToTickEnabled="True" ValueEnd="8" Orientation="Vertical"/>
<hc:RangeSlider Height="400" IsSnapToTickEnabled="True" ValueEnd="3" Margin="32,0,0,0" IsEnabled="False" Orientation="Vertical"/>
<hc:RangeSlider Height="400" hc:TipElement.Visibility="Visible" IsSnapToTickEnabled="True" Maximum="100" ValueEnd="60" TickFrequency="10" TickPlacement="BottomRight" Margin="32,0,0,0" Orientation="Vertical"/>
<hc:RangeSlider Height="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="BottomRight" IsSnapToTickEnabled="True" ValueEnd="5" TickPlacement="Both" Margin="32,0" Orientation="Vertical"/>
<hc:RangeSlider Height="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Left" IsSnapToTickEnabled="True" Maximum="100" ValueEnd="60" TickFrequency="10" TickPlacement="BottomRight" Margin="32,0,0,0" Orientation="Vertical"/>
<hc:RangeSlider Height="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Right" hc:TipElement.StringFormat="#0.00" ValueEnd="5" TickPlacement="Both" Margin="32,0" Orientation="Vertical"/>
</StackPanel>
</StackPanel>
</hc:TransitioningContentControl>
@@ -16,6 +16,9 @@
<Button Click="ButtonCustomContent_OnClick" Content="{x:Static langs:Lang.OpenCustomContentWindow}"/>
<Button Name="ButtonMouseFollow" Click="ButtonMouseFollow_OnClick" Content="{x:Static langs:Lang.OpenMouseFollowWindow}"/>
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.NoNonClientAreaDragableWindow}" Content="{x:Static langs:Lang.OpenNoNonClientAreaDragableWindow}"/>
<hc:Badge Text="New" Style="{StaticResource BadgeDanger}" VerticalAlignment="Center" HorizontalAlignment="Center" BadgeMargin="0,-10,-20,0">
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.GlowWindow}" Content="{x:Static langs:Lang.OpenGlowWindow}"/>
</hc:Badge>
</UniformGrid>
</hc:TransitioningContentControl>
</UserControl>
@@ -24,8 +24,8 @@
</Style>
</Border.Resources>
<DockPanel>
<Button Command="{Binding OpenOverviewCmd}" DockPanel.Dock="Top" HorizontalAlignment="Stretch" Margin="4,4,4,0" Content="{x:Static langs:Lang.Overview}"/>
<TabControl SelectionChanged="TabControl_OnSelectionChanged" ItemsSource="{Binding DemoInfoList}" Style="{StaticResource TabControlInLine}" Background="Transparent" SelectedIndex="0">
<Button Command="{Binding OpenOverviewCmd}" DockPanel.Dock="Top" HorizontalAlignment="Stretch" Margin="4" Content="{x:Static langs:Lang.Overview}"/>
<TabControl SelectionChanged="TabControl_OnSelectionChanged" ItemContainerStyle="{StaticResource TabItemTransparent}" ItemsSource="{Binding DemoInfoList}" Style="{StaticResource TabControlInLine}" Background="Transparent" SelectedIndex="0">
<TabControl.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Title}"/>
@@ -44,7 +44,7 @@
</Grid.ColumnDefinitions>
<hc:SearchBar SearchStarted="SearchBar_OnSearchStarted" Style="{StaticResource SearchBarPlus}" hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterKey}" Margin="4" Tag="{Binding ElementName=ListBoxDemo}"/>
<ToggleButton Tag="{Binding ElementName=ListBoxDemo}" Name="ButtonStyleAscending" Click="ButtonAscending_OnClick" Grid.Row="0" Grid.Column="1" Margin="0,0,4,0" Style="{StaticResource DemoInfoSortButtonStyle}"/>
<ListBox Name="ListBoxDemo" SelectedIndex="{Binding SelectedIndex}" ItemsSource="{Binding DemoItemList}" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBox Name="ListBoxDemo" VirtualizingStackPanel.IsVirtualizing="True" SelectedIndex="{Binding SelectedIndex}" ItemsSource="{Binding DemoItemList}" Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
@@ -7,7 +7,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl">
<ScrollViewer HorizontalScrollBarVisibility="Auto">
<ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible">
<Canvas HorizontalAlignment="Center" VerticalAlignment="Center" Name="CanvasMain" Margin="32" Width="1665" Height="1300">
<Border Visibility="Visible" BorderThickness="0" Padding="16" Style="{StaticResource BorderRegion}" CornerRadius="4">
<StackPanel>
@@ -0,0 +1,101 @@
<UserControl x:Class="HandyControlDemo.UserControl.FlowDocumentScrollViewerDemoCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
Background="{DynamicResource RegionBrush}">
<hc:TransitioningContentControl>
<FlowDocumentScrollViewer IsToolBarVisible="True" Width="502" Height="400" Margin="32">
<FlowDocument ColumnWidth="400" IsOptimalParagraphEnabled="True" IsHyphenationEnabled="True">
<Section FontSize="12">
<Paragraph>
<Bold>Neptune</Bold> (planet), major planet in the solar system, eighth planet
from the Sun and fourth largest in diameter. Neptune maintains an almost constant
distance, about 4,490 million km (about 2,790 million mi), from the Sun. Neptune
revolves outside the orbit of Uranus and for most of its orbit moves inside the
elliptical path of the outermost planet Pluto (see Solar System). Every 248 years,
Pluto’s elliptical orbit brings the planet inside Neptune’s nearly circular orbit
for about 20 years, temporarily making Neptune the farthest planet from the Sun.
The last time Pluto’s orbit brought it inside Neptune’s orbit was in 1979. In
1999 Pluto’s orbit carried it back outside Neptune’s orbit.
<Figure Width="140" Height="50" Background="GhostWhite" HorizontalAnchor="PageLeft" HorizontalOffset="100" VerticalOffset="20">
<Paragraph FontStyle="Italic" TextAlignment="Left" Background="Beige" Foreground="DarkGreen">
Neptune has 72 times Earth's volume...
</Paragraph>
</Figure>
<Floater Background="GhostWhite" Width="285" HorizontalAlignment="Left">
<Table CellSpacing="5">
<Table.Columns>
<TableColumn Width="155"/>
<TableColumn Width="130"/>
</Table.Columns>
<TableRowGroup>
<TableRow>
<TableCell ColumnSpan="3">
<Paragraph>Neptune Stats</Paragraph>
</TableCell>
</TableRow>
<TableRow Background="LightGoldenrodYellow" FontSize="12">
<TableCell>
<Paragraph FontWeight="Bold">Mean Distance from Sun</Paragraph>
</TableCell>
<TableCell>
<Paragraph>4,504,000,000 km</Paragraph>
</TableCell>
</TableRow>
<TableRow FontSize="12" Background="LightGray">
<TableCell>
<Paragraph FontWeight="Bold">Mean Diameter</Paragraph>
</TableCell>
<TableCell>
<Paragraph>49,532 km</Paragraph>
</TableCell>
</TableRow>
<TableRow Background="LightGoldenrodYellow" FontSize="12">
<TableCell>
<Paragraph FontWeight="Bold">Approximate Mass</Paragraph>
</TableCell>
<TableCell>
<Paragraph>1.0247e26 kg</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell ColumnSpan="4">
<Paragraph FontSize="10" FontStyle="Italic">
Information from the
<Hyperlink NavigateUri="http://encarta.msn.com/encnet/refpages/artcenter.aspx">Encarta</Hyperlink>
web site.
</Paragraph>
</TableCell>
</TableRow>
</TableRowGroup>
</Table>
</Floater>
</Paragraph>
<Paragraph>
Astronomers believe Neptune has an inner rocky core that is surrounded by a vast
ocean of water mixed with rocky material. From the inner core, this ocean extends
upward until it meets a gaseous atmosphere of hydrogen, helium, and trace amounts
of methane. Neptune has four rings and 11 known moons. Even though Neptune's volume
is 72 times Earth’s volume, its mass is only 17.15 times Earth’s mass. Because of
its size, scientists classify Neptune—along with Jupiter, Saturn, and Uranus—as
one of the giant or Jovian planets (so-called because they resemble Jupiter).
</Paragraph>
<Paragraph>
<Figure Width="140" Height="50" Background="GhostWhite" TextAlignment="Left" HorizontalAnchor="PageCenter" WrapDirection="Both">
<Paragraph FontStyle="Italic" Background="Beige" Foreground="DarkGreen" >
Neptune has an orbital period of ~20 years...
</Paragraph>
</Figure>
Mathematical theories of astronomy led to the discovery of Neptune. To account for
wobbles in the orbit of the planet Uranus, British astronomer John Couch Adams and
French astronomer Urbain Jean Joseph Leverrier independently calculated the existence
and position of a new planet in 1845 and 1846, respectively. They theorized that the
gravitational attraction of this planet for Uranus was causing the wobbles in Uranus’s
orbit. Using information from Leverrier, German astronomer Johann Gottfried Galle first
observed the planet in 1846.
</Paragraph>
</Section>
</FlowDocument>
</FlowDocumentScrollViewer>
</hc:TransitioningContentControl>
</UserControl>
@@ -0,0 +1,10 @@
namespace HandyControlDemo.UserControl
{
public partial class FlowDocumentScrollViewerDemoCtl
{
public FlowDocumentScrollViewerDemoCtl()
{
InitializeComponent();
}
}
}
@@ -11,7 +11,7 @@
<ProgressBar Style="{StaticResource ProgressBarSuccess}" Margin="0,0,0,10" Value="40"/>
<ProgressBar Style="{StaticResource ProgressBarInfo}" Margin="0,0,0,10" Value="60"/>
<ProgressBar Style="{StaticResource ProgressBarWarning}" Margin="0,0,0,10" Value="80"/>
<ProgressBar Style="{StaticResource ProgressBarDanger}" Margin="0,0,0,10" Value="100" Maximum="200"/>
<ProgressBar Style="{StaticResource ProgressBarDanger}" Margin="0,0,0,10" Value="100" Maximum="200" IsIndeterminate="True"/>
</StackPanel>
<StackPanel Margin="10,0,0,0" Width="200" HorizontalAlignment="Left">
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressbarPrimary" HorizontalAlignment="Left"/>
@@ -27,8 +27,8 @@
<ProgressBar Style="{StaticResource ProgressBarSuccessStripe}" Margin="0,0,0,10" Value="60" Maximum="200" />
<ProgressBar Style="{StaticResource ProgressBarInfoStripe}" Margin="0,0,0,10" Value="50" Maximum="200" />
<ProgressBar Style="{StaticResource ProgressBarWarningStripe}" Margin="0,0,0,10" Value="180" Maximum="200" />
<ProgressBar Style="{StaticResource ProgressBarDangerStripe}" Margin="0,0,0,10" Value="110" Maximum="200" />
<ProgressBar Style="{StaticResource ProgressBarFlat}" Margin="0,8,0,10" Value="110" Maximum="200" />
<ProgressBar Style="{StaticResource ProgressBarDangerStripe}" Margin="0,0,0,10" IsIndeterminate="True" Maximum="200" />
<ProgressBar Style="{StaticResource ProgressBarFlat}" Margin="0,8,0,10" Value="110" Maximum="200" IsIndeterminate="True"/>
</StackPanel>
<StackPanel Margin="10,0,0,0" Width="200" HorizontalAlignment="Left">
<TextBlock Padding="0,2,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPrimaryStripe" HorizontalAlignment="Left"/>
@@ -39,6 +39,20 @@
<TextBlock Padding="0,12,0,3" Style="{StaticResource TextBlockDefault}" Text="ProgressBarPlayer" HorizontalAlignment="Left"/>
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Height="200">
<ProgressBar Value="20" Margin="0,0,10,0" Orientation="Vertical" Width="20"/>
<ProgressBar Style="{StaticResource ProgressBarSuccess}" Margin="0,0,10,0" Value="40" Orientation="Vertical" Width="20"/>
<ProgressBar Style="{StaticResource ProgressBarInfo}" Margin="0,0,10,0" Value="60" Orientation="Vertical" Width="20"/>
<ProgressBar Style="{StaticResource ProgressBarWarning}" Margin="0,0,10,0" Value="80" Orientation="Vertical" Width="20"/>
<ProgressBar Style="{StaticResource ProgressBarDanger}" Margin="0,0,10,0" Value="100" Maximum="200" IsIndeterminate="True" Width="20" Orientation="Vertical"/>
<ProgressBar Style="{StaticResource ProgressBarPrimaryStripe}" Margin="10,0,10,0" Value="120" Maximum="200" Orientation="Vertical" Width="20" />
<ProgressBar Style="{StaticResource ProgressBarSuccessStripe}" Margin="0,0,10,0" Value="60" Maximum="200" Orientation="Vertical" Width="20" />
<ProgressBar Style="{StaticResource ProgressBarInfoStripe}" Margin="0,0,10,0" Value="50" Maximum="200" Orientation="Vertical" Width="20" />
<ProgressBar Style="{StaticResource ProgressBarWarningStripe}" Margin="0,0,10,0" Value="180" Maximum="200" Orientation="Vertical" Width="20" />
<ProgressBar Style="{StaticResource ProgressBarDangerStripe}" Margin="0,0,10,0" IsIndeterminate="True" Maximum="200" Orientation="Vertical" Width="20"/>
<ProgressBar Style="{StaticResource ProgressBarFlat}" Margin="0,0,10,0" Value="110" Maximum="200" IsIndeterminate="True" Orientation="Vertical" Width="4"/>
</StackPanel>
</WrapPanel>
</hc:TransitioningContentControl>
</UserControl>
@@ -9,15 +9,15 @@
<Slider Width="400" IsSnapToTickEnabled="True" Value="8"/>
<Slider Width="400" IsSnapToTickEnabled="True" Value="3" Margin="0,32,0,0" IsEnabled="False"/>
<Slider Width="400" IsSnapToTickEnabled="True" TickFrequency="5" Maximum="100" TickPlacement="TopLeft" Value="10" IsSelectionRangeEnabled="True" SelectionStart="10" SelectionEnd="80" Margin="0,32,0,0"/>
<Slider Width="400" hc:TipElement.Visibility="Visible" IsSnapToTickEnabled="True" Maximum="100" Value="60" TickFrequency="10" TickPlacement="BottomRight" Margin="0,32,0,0"/>
<Slider Width="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="BottomRight" IsSnapToTickEnabled="True" Value="5" TickPlacement="Both" Margin="0,32,0,0"/>
<Slider Width="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Top" IsSnapToTickEnabled="True" Maximum="100" Value="60" TickFrequency="10" TickPlacement="BottomRight" Margin="0,32,0,0"/>
<Slider Width="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Bottom" hc:TipElement.StringFormat="#0.00" Value="5" TickPlacement="Both" Margin="0,32,0,0"/>
</StackPanel>
<StackPanel Margin="32,0,0,0" Orientation="Horizontal">
<Slider Height="400" IsSnapToTickEnabled="True" Value="8" Orientation="Vertical"/>
<Slider Height="400" IsSnapToTickEnabled="True" Value="3" Margin="32,0,0,0" IsEnabled="False" Orientation="Vertical"/>
<Slider Height="400" IsSnapToTickEnabled="True" TickFrequency="5" Maximum="100" TickPlacement="TopLeft" Value="10" IsSelectionRangeEnabled="True" SelectionStart="20" SelectionEnd="80" Margin="32,0,0,0" Orientation="Vertical"/>
<Slider Height="400" hc:TipElement.Visibility="Visible" IsSnapToTickEnabled="True" Maximum="100" Value="60" TickFrequency="10" TickPlacement="BottomRight" Margin="32,0,0,0" Orientation="Vertical"/>
<Slider Height="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="BottomRight" IsSnapToTickEnabled="True" Value="5" TickPlacement="Both" Margin="32,0" Orientation="Vertical"/>
<Slider Height="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Left" IsSnapToTickEnabled="True" Maximum="100" Value="60" TickFrequency="10" TickPlacement="BottomRight" Margin="32,0,0,0" Orientation="Vertical"/>
<Slider Height="400" hc:TipElement.Visibility="Visible" hc:TipElement.Placement="Right" hc:TipElement.StringFormat="#0.00" Value="5" TickPlacement="Both" Margin="32,0" Orientation="Vertical"/>
</StackPanel>
</StackPanel>
</hc:TransitioningContentControl>
@@ -27,7 +27,10 @@
</UserControl.Resources>
<UserControl.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource StoryboardOnLoaded}"/>
<BeginStoryboard Name="BeginStoryboard" Storyboard="{StaticResource StoryboardOnLoaded}"/>
</EventTrigger>
<EventTrigger RoutedEvent="FrameworkElement.Unloaded">
<StopStoryboard BeginStoryboardName="BeginStoryboard"/>
</EventTrigger>
</UserControl.Triggers>
<hc:TransitioningContentControl>
@@ -10,7 +10,6 @@
ShowTitle="True"
BorderThickness="1"
BorderBrush="#262e2f"
Style="{StaticResource WindowWin10}"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
@@ -1,15 +1,14 @@
<hc:BlurWindow x:Class="HandyControlDemo.Window.BlurWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
Title="{x:Static langs:Lang.Title}"
Style="{StaticResource WindowBlur}"
Height="450"
Width="800"
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
Title="{x:Static langs:Lang.Title}"
Height="450"
Width="800"
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
</hc:BlurWindow>
@@ -8,7 +8,6 @@
mc:Ignorable="d"
Background="{DynamicResource MainContentBackgroundBrush}"
WindowStartupLocation="CenterScreen"
Style="{StaticResource WindowWin10}"
Title="{x:Static langs:Lang.Title}"
Height="450"
Width="800"
@@ -9,10 +9,9 @@
OtherButtonForeground="{DynamicResource ReverseTextBrush}"
CloseButtonForeground="{DynamicResource ReverseTextBrush}"
NonClientAreaBackground="{DynamicResource ToolBarBackground}"
NonClientAreaHeight="69"
NonClientAreaHeight="62"
Background="{DynamicResource MainContentBackgroundBrush}"
WindowStartupLocation="CenterScreen"
Style="{StaticResource WindowWin10}"
ShowTitle="False"
Title="{x:Static langs:Lang.Title}"
Height="450"
@@ -0,0 +1,17 @@
<hc:GlowWindow x:Class="HandyControlDemo.Window.GlowWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
mc:Ignorable="d"
Background="{DynamicResource MainContentBackgroundBrush}"
WindowStartupLocation="CenterScreen"
Title="{x:Static langs:Lang.Title}"
ActiveGlowColor="{DynamicResource PrimaryColor}"
Height="450"
Width="800"
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
<Border Background="{DynamicResource MainContentForegroundDrawingBrush}"/>
</hc:GlowWindow>
@@ -0,0 +1,10 @@
namespace HandyControlDemo.Window
{
public partial class GlowWindow
{
public GlowWindow()
{
InitializeComponent();
}
}
}
@@ -8,7 +8,6 @@
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
ShowTitle="True"
Style="{StaticResource WindowBlur}"
Icon="/HandyControlDemo;component/Resources/Img/icon.ico"
ShowNonClientArea="False"
Title="NoClientDragableWindow"
@@ -18,5 +18,14 @@ namespace HandyControl.Controls
public static void SetPlacement(DependencyObject element, TipPlacement value) => element.SetValue(PlacementProperty, value);
public static TipPlacement GetPlacement(DependencyObject element) => (TipPlacement) element.GetValue(PlacementProperty);
public static readonly DependencyProperty StringFormatProperty = DependencyProperty.RegisterAttached(
"StringFormat", typeof(string), typeof(TipElement), new PropertyMetadata("#0.0"));
public static void SetStringFormat(DependencyObject element, string value)
=> element.SetValue(StringFormatProperty, value);
public static string GetStringFormat(DependencyObject element)
=> (string) element.GetValue(StringFormatProperty);
}
}
@@ -97,7 +97,7 @@ namespace HandyControl.Controls
{
var _ = new WindowInteropHelper(window)
{
Owner = NativeMethods.GetDesktopWindow()
Owner = InteropMethods.GetDesktopWindow()
};
}
}
@@ -96,10 +96,10 @@ namespace HandyControl.Controls
public static Color GetColorAt(int x, int y)
{
var desk = UnsafeNativeMethods.GetDesktopWindow();
var dc = UnsafeNativeMethods.GetWindowDC(desk);
var a = (int)UnsafeNativeMethods.GetPixel(dc, x, y);
UnsafeNativeMethods.ReleaseDC(desk, dc);
var desk = InteropMethods.GetDesktopWindow();
var dc = InteropMethods.GetWindowDC(desk);
var a = (int)InteropMethods.GetPixel(dc, x, y);
InteropMethods.ReleaseDC(desk, dc);
return Color.FromArgb(255, (byte) ((a >> 0) & 0xff), (byte) ((a >> 8) & 0xff), (byte) ((a >> 16) & 0xff));
}
}
@@ -23,13 +23,46 @@ namespace HandyControl.Controls
private int _blockHeight;
private bool _isDisposed;
public ImageBlock()
{
_dispatcherTimer = new DispatcherTimer(DispatcherPriority.Render)
{
Interval = Interval
};
_dispatcherTimer.Tick += DispatcherTimer_Tick;
IsVisibleChanged += ImageBlock_IsVisibleChanged;
}
~ImageBlock() => Dispose();
public void Dispose()
{
if (_isDisposed) return;
IsVisibleChanged -= ImageBlock_IsVisibleChanged;
_dispatcherTimer.Stop();
_isDisposed = true;
GC.SuppressFinalize(this);
}
private void ImageBlock_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if(IsVisible)
{
_dispatcherTimer.Tick += DispatcherTimer_Tick;
if (IsPlaying)
{
_dispatcherTimer.Start();
}
}
else
{
_dispatcherTimer.Stop();
_dispatcherTimer.Tick -= DispatcherTimer_Tick;
}
}
private void UpdateDatas()
@@ -13,18 +13,23 @@ namespace HandyControl.Controls
/// 数值选择控件
/// </summary>
[TemplatePart(Name = ElementTextBox, Type = typeof(TextBox))]
[TemplatePart(Name = ElementErrorTip, Type = typeof(UIElement))]
public class NumericUpDown : Control, IDataInput
{
#region Constants
private const string ElementTextBox = "PART_TextBox";
private const string ElementErrorTip = "PART_ErrorTip";
#endregion Constants
#region Data
private TextBox _textBox;
private UIElement _errorTip;
private bool _updateText;
#endregion Data
@@ -77,6 +82,7 @@ namespace HandyControl.Controls
base.OnApplyTemplate();
_textBox = GetTemplateChild(ElementTextBox) as TextBox;
_errorTip = GetTemplateChild(ElementErrorTip) as UIElement;
if (_textBox != null)
{
@@ -105,7 +111,7 @@ namespace HandyControl.Controls
private void TextBox_LostFocus(object sender, RoutedEventArgs e)
{
if (IsError) return;
if (IsError && _errorTip != null) return;
_textBox.Text = CurrentText;
}
@@ -196,13 +202,7 @@ namespace HandyControl.Controls
ctl.Value = maximum;
}
var result = num > maximum ? maximum : num;
if (!ctl.DecimalPlaces.HasValue)
{
result = Math.Floor(result);
}
return result;
return num > maximum ? maximum : num;
}
/// <summary>
@@ -60,8 +60,6 @@ namespace HandyControl.Controls
private SecureString _password;
private char _passwordChar;
private System.Windows.Controls.TextBox _textBox;
public PasswordBox()
@@ -223,12 +221,6 @@ namespace HandyControl.Controls
}
}
}
if (_passwordChar != default(char))
{
ActualPasswordBox.PasswordChar = _passwordChar;
_passwordChar = default;
}
}
if (_textBox != null)
@@ -1,9 +1,339 @@
using System.Windows.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using HandyControl.Data;
using HandyControl.Tools;
using HandyControl.Tools.Extension;
namespace HandyControl.Controls
{
[TemplatePart(Name = ElementPanel, Type = typeof(Panel))]
public class PinBox : Control
{
private const string ElementPanel = "PART_Panel";
private static readonly object MinLength = 4;
private Panel _panel;
private int _inputIndex;
private bool _changed;
private bool _isInternalAction;
private List<SecureString> _passwordList;
private RoutedEventHandler _passwordBoxsGotFocusEventHandler;
private RoutedEventHandler _passwordBoxsPasswordChangedEventHandler;
public PinBox()
{
Loaded += PinBox_Loaded;
Unloaded += PinBox_Unloaded;
}
private void PinBox_Unloaded(object sender, RoutedEventArgs e)
{
RemoveHandler(System.Windows.Controls.PasswordBox.PasswordChangedEvent, _passwordBoxsPasswordChangedEventHandler);
RemoveHandler(GotFocusEvent, _passwordBoxsGotFocusEventHandler);
Loaded -= PinBox_Loaded;
Unloaded -= PinBox_Unloaded;
}
private void PinBox_Loaded(object sender, RoutedEventArgs e)
{
_passwordBoxsPasswordChangedEventHandler = PasswordBoxsPasswordChanged;
AddHandler(System.Windows.Controls.PasswordBox.PasswordChangedEvent, _passwordBoxsPasswordChangedEventHandler);
_passwordBoxsGotFocusEventHandler = PasswordBoxsGotFocus;
AddHandler(GotFocusEvent, _passwordBoxsGotFocusEventHandler);
}
private void PasswordBoxsPasswordChanged(object sender, RoutedEventArgs e)
{
if (_isInternalAction) return;
if (e.OriginalSource is System.Windows.Controls.PasswordBox passwordBox)
{
if (passwordBox.Password.Length > 0)
{
if (++_inputIndex >= Length)
{
_inputIndex = Length - 1;
if (_panel.Children.OfType<System.Windows.Controls.PasswordBox>()
.All(item => item.Password.Any()))
{
FocusManager.SetFocusedElement(this, null);
Keyboard.ClearFocus();
RaiseEvent(new RoutedEventArgs(CompletedEvent, this));
}
return;
}
}
else
{
if (--_inputIndex < 0)
{
_inputIndex = 0;
return;
}
}
_changed = true;
FocusManager.SetFocusedElement(this, _panel.Children[_inputIndex]);
}
}
private void PasswordBoxsGotFocus(object sender, RoutedEventArgs e)
{
if (e.OriginalSource is System.Windows.Controls.PasswordBox passwordBox)
{
_inputIndex = _panel.Children.IndexOf(passwordBox);
passwordBox.SelectAll();
}
}
protected override void OnPreviewKeyDown(KeyEventArgs e)
{
base.OnPreviewKeyUp(e);
if (e.Key == Key.Left)
{
if (--_inputIndex < 0)
{
_inputIndex = 0;
return;
}
var passwordBox = _panel.Children[_inputIndex] as System.Windows.Controls.PasswordBox;
passwordBox?.SelectAll();
FocusManager.SetFocusedElement(this, passwordBox);
}
else if (e.Key == Key.Right)
{
if (++_inputIndex >= Length)
{
_inputIndex = Length - 1;
return;
}
var passwordBox = _panel.Children[_inputIndex] as System.Windows.Controls.PasswordBox;
passwordBox?.SelectAll();
FocusManager.SetFocusedElement(this, passwordBox);
}
}
protected override void OnPreviewKeyUp(KeyEventArgs e)
{
base.OnPreviewKeyUp(e);
if (_changed)
{
_changed = false;
return;
}
if (e.Key == Key.Delete || e.Key == Key.Back)
{
if (_panel.Children[_inputIndex] is System.Windows.Controls.PasswordBox passwordBox)
{
_isInternalAction = true;
passwordBox.Clear();
_isInternalAction = false;
}
if (--_inputIndex < 0)
{
_inputIndex = 0;
return;
}
FocusManager.SetFocusedElement(this, _panel.Children[_inputIndex]);
}
}
public string Password
{
get
{
return string.Join("", _panel.Children.OfType<System.Windows.Controls.PasswordBox>().Select(item => item.Password));
}
set
{
if (_panel == null)
{
_passwordList = new List<SecureString>();
if (value == null)
{
value = string.Empty;
}
foreach (var item in value)
{
var secureString = new SecureString();
secureString.AppendChar(item);
_passwordList.Add(secureString);
}
return;
}
var length = Length;
if (string.IsNullOrEmpty(value) || value.Length != length || value.Length != _panel.Children.Count)
{
_panel.Children.OfType<System.Windows.Controls.PasswordBox>().Do(item => item.Clear());
}
else
{
_panel.Children.OfType<System.Windows.Controls.PasswordBox>().DoWithIndex((item, index) => item.Password = value[index].ToString());
}
}
}
/// <summary>
/// 掩码字符
/// </summary>
public static readonly DependencyProperty PasswordCharProperty =
System.Windows.Controls.PasswordBox.PasswordCharProperty.AddOwner(typeof(PinBox),
new FrameworkPropertyMetadata('●'));
public char PasswordChar
{
get => (char)GetValue(PasswordCharProperty);
set => SetValue(PasswordCharProperty, value);
}
public static readonly DependencyProperty LengthProperty = DependencyProperty.Register(
"Length", typeof(int), typeof(PinBox), new PropertyMetadata(MinLength, OnLengthChanged, CoerceLength), ValidateHelper.IsInRangeOfPosInt);
private static void OnLengthChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var ctl = (PinBox) d;
ctl.UpdateItems();
}
private static object CoerceLength(DependencyObject d, object basevalue) => (int)basevalue < 4 ? MinLength : basevalue;
public int Length
{
get => (int) GetValue(LengthProperty);
set => SetValue(LengthProperty, value);
}
public static readonly DependencyProperty ItemMarginProperty = DependencyProperty.Register(
"ItemMargin", typeof(Thickness), typeof(PinBox), new PropertyMetadata(default(Thickness)));
public Thickness ItemMargin
{
get => (Thickness) GetValue(ItemMarginProperty);
set => SetValue(ItemMarginProperty, value);
}
public static readonly DependencyProperty ItemWidthProperty = DependencyProperty.Register(
"ItemWidth", typeof(double), typeof(PinBox), new PropertyMetadata(ValueBoxes.Double0Box));
public double ItemWidth
{
get => (double) GetValue(ItemWidthProperty);
set => SetValue(ItemWidthProperty, value);
}
public static readonly DependencyProperty ItemHeightProperty = DependencyProperty.Register(
"ItemHeight", typeof(double), typeof(PinBox), new PropertyMetadata(ValueBoxes.Double0Box));
public double ItemHeight
{
get => (double) GetValue(ItemHeightProperty);
set => SetValue(ItemHeightProperty, value);
}
public static readonly RoutedEvent CompletedEvent =
EventManager.RegisterRoutedEvent("Completed", RoutingStrategy.Bubble,
typeof(RoutedEventHandler), typeof(PinBox));
public event RoutedEventHandler Completed
{
add => AddHandler(CompletedEvent, value);
remove => RemoveHandler(CompletedEvent, value);
}
private void UpdateItems()
{
if (_panel == null) return;
_panel.Children.Clear();
var length = Length;
for (var i = 0; i < length; i++)
{
_panel.Children.Add(CreatePasswordBox());
}
}
private System.Windows.Controls.PasswordBox CreatePasswordBox()
{
return new System.Windows.Controls.PasswordBox
{
MaxLength = 1,
HorizontalContentAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
Margin = ItemMargin,
Width = ItemWidth,
Height = ItemHeight,
Padding = default,
PasswordChar = PasswordChar
};
}
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
_panel = GetTemplateChild(ElementPanel) as Panel;
if (_panel != null)
{
UpdateItems();
var length = Length;
if (_passwordList != null && _passwordList.Count == length && _panel.Children.Count == length)
{
for (var i = 0; i < length; i++)
{
var password = _passwordList[i];
if (password.Length > 0)
{
var valuePtr = IntPtr.Zero;
try
{
valuePtr = Marshal.SecureStringToGlobalAllocUnicode(password);
if (_panel.Children[i] is System.Windows.Controls.PasswordBox passwordBox)
{
passwordBox.Password = Marshal.PtrToStringUni(valuePtr) ?? throw new InvalidOperationException();
}
}
finally
{
Marshal.ZeroFreeGlobalAllocUnicode(valuePtr);
password.Clear();
}
}
}
_passwordList.Clear();
}
}
}
}
}
@@ -22,7 +22,7 @@ namespace HandyControl.Controls
[ContentProperty("Items")]
[TemplatePart(Name = ElementPanelPage, Type = typeof(Panel))]
[TemplatePart(Name = ElementItemsControl, Type = typeof(ItemsPresenter))]
public class Carousel : ListBox
public class Carousel : ListBox, IDisposable
{
#region Constants
@@ -33,6 +33,8 @@ namespace HandyControl.Controls
#region Data
private bool _isDisposed;
private Panel _panelPage;
private bool _appliedTemplate;
@@ -119,6 +121,36 @@ namespace HandyControl.Controls
CommandBindings.Add(new CommandBinding(ControlCommands.Selected, ButtonPages_OnClick));
Loaded += (s, e) => UpdatePageButtons();
IsVisibleChanged += Carousel_IsVisibleChanged;
}
~Carousel() => Dispose();
public void Dispose()
{
if (_isDisposed) return;
IsVisibleChanged -= Carousel_IsVisibleChanged;
_updateTimer.Stop();
_isDisposed = true;
GC.SuppressFinalize(this);
}
private void Carousel_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (_updateTimer == null) return;
if (IsVisible)
{
_updateTimer.Tick += UpdateTimer_Tick;
_updateTimer.Start();
}
else
{
_updateTimer.Stop();
_updateTimer.Tick -= UpdateTimer_Tick;
}
}
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
@@ -33,7 +33,7 @@ namespace HandyControl.Controls
private IconHandle _iconHandle;
private const int WmTrayMouseMessage = NativeMethods.WM_USER + 1024;
private const int WmTrayMouseMessage = InteropValues.WM_USER + 1024;
private string _windowClassName;
@@ -41,7 +41,7 @@ namespace HandyControl.Controls
private IntPtr _messageWindowHandle;
private readonly WndProc _callback;
private readonly InteropValues.WndProc _callback;
private Popup _contextContent;
@@ -93,10 +93,7 @@ namespace HandyControl.Controls
if (Application.Current != null) Application.Current.Exit += (s, e) => Dispose();
}
~NotifyIcon()
{
Dispose(false);
}
~NotifyIcon() => Dispose(false);
public void Init()
{
@@ -165,9 +162,9 @@ namespace HandyControl.Controls
{
if (!_added || DesignerHelper.IsInDesignMode) return;
var data = new NOTIFYICONDATA
var data = new InteropValues.NOTIFYICONDATA
{
uFlags = NativeMethods.NIF_INFO,
uFlags = InteropValues.NIF_INFO,
hWnd = _messageWindowHandle,
uID = _id,
szInfoTitle = title ?? string.Empty,
@@ -177,20 +174,20 @@ namespace HandyControl.Controls
switch (infoType)
{
case NotifyIconInfoType.Info:
data.dwInfoFlags = NativeMethods.NIIF_INFO;
data.dwInfoFlags = InteropValues.NIIF_INFO;
break;
case NotifyIconInfoType.Warning:
data.dwInfoFlags = NativeMethods.NIIF_WARNING;
data.dwInfoFlags = InteropValues.NIIF_WARNING;
break;
case NotifyIconInfoType.Error:
data.dwInfoFlags = NativeMethods.NIIF_ERROR;
data.dwInfoFlags = InteropValues.NIIF_ERROR;
break;
case NotifyIconInfoType.None:
data.dwInfoFlags = NativeMethods.NIIF_NONE;
data.dwInfoFlags = InteropValues.NIIF_NONE;
break;
}
UnsafeNativeMethods.Shell_NotifyIcon(NativeMethods.NIM_MODIFY, data);
InteropMethods.Shell_NotifyIcon(InteropValues.NIM_MODIFY, data);
}
public void Dispose()
@@ -330,7 +327,7 @@ namespace HandyControl.Controls
{
var isTrue = FindNotifyIcon(out var rectNotify);
if (!isTrue) return false;
NativeMethods.GetCursorPos(out var point);
InteropMethods.GetCursorPos(out var point);
if (point.X >= rectNotify.Left && point.X <= rectNotify.Right &&
point.Y >= rectNotify.Top && point.Y <= rectNotify.Bottom)
{
@@ -368,17 +365,17 @@ namespace HandyControl.Controls
//referenced from http://www.cnblogs.com/sczmzx/p/5158127.html
private IntPtr FindTrayToolbarWindow()
{
var hWnd = NativeMethods.FindWindow("Shell_TrayWnd", null);
var hWnd = InteropMethods.FindWindow("Shell_TrayWnd", null);
if (hWnd != IntPtr.Zero)
{
hWnd = NativeMethods.FindWindowEx(hWnd, IntPtr.Zero, "TrayNotifyWnd", null);
hWnd = InteropMethods.FindWindowEx(hWnd, IntPtr.Zero, "TrayNotifyWnd", null);
if (hWnd != IntPtr.Zero)
{
hWnd = NativeMethods.FindWindowEx(hWnd, IntPtr.Zero, "SysPager", null);
hWnd = InteropMethods.FindWindowEx(hWnd, IntPtr.Zero, "SysPager", null);
if (hWnd != IntPtr.Zero)
{
hWnd = NativeMethods.FindWindowEx(hWnd, IntPtr.Zero, "ToolbarWindow32", null);
hWnd = InteropMethods.FindWindowEx(hWnd, IntPtr.Zero, "ToolbarWindow32", null);
}
}
@@ -389,17 +386,17 @@ namespace HandyControl.Controls
//referenced from http://www.cnblogs.com/sczmzx/p/5158127.html
private IntPtr FindTrayToolbarOverFlowWindow()
{
var hWnd = NativeMethods.FindWindow("NotifyIconOverflowWindow", null);
var hWnd = InteropMethods.FindWindow("NotifyIconOverflowWindow", null);
if (hWnd != IntPtr.Zero)
{
hWnd = NativeMethods.FindWindowEx(hWnd, IntPtr.Zero, "ToolbarWindow32", null);
hWnd = InteropMethods.FindWindowEx(hWnd, IntPtr.Zero, "ToolbarWindow32", null);
}
return hWnd;
}
private bool FindNotifyIcon(out NativeMethods.RECT rect)
private bool FindNotifyIcon(out InteropValues.RECT rect)
{
var rectNotify = new NativeMethods.RECT();
var rectNotify = new InteropValues.RECT();
var hTrayWnd = FindTrayToolbarWindow();
var isTrue = FindNotifyIcon(hTrayWnd, ref rectNotify);
if (!isTrue)
@@ -412,48 +409,48 @@ namespace HandyControl.Controls
}
//referenced from http://www.cnblogs.com/sczmzx/p/5158127.html
private bool FindNotifyIcon(IntPtr hTrayWnd, ref NativeMethods.RECT rectNotify)
private bool FindNotifyIcon(IntPtr hTrayWnd, ref InteropValues.RECT rectNotify)
{
NativeMethods.GetWindowRect(hTrayWnd, out var rectTray);
var count = (int)NativeMethods.SendMessage(hTrayWnd, NativeMethods.TB_BUTTONCOUNT, 0, IntPtr.Zero);
InteropMethods.GetWindowRect(hTrayWnd, out var rectTray);
var count = (int)InteropMethods.SendMessage(hTrayWnd, InteropValues.TB_BUTTONCOUNT, 0, IntPtr.Zero);
var isFind = false;
if (count > 0)
{
NativeMethods.GetWindowThreadProcessId(hTrayWnd, out var trayPid);
var hProcess = NativeMethods.OpenProcess(NativeMethods.ProcessAccess.VMOperation | NativeMethods.ProcessAccess.VMRead | NativeMethods.ProcessAccess.VMWrite, false, trayPid);
var address = NativeMethods.VirtualAllocEx(hProcess, IntPtr.Zero, 1024, NativeMethods.AllocationType.Commit, NativeMethods.MemoryProtection.ReadWrite);
InteropMethods.GetWindowThreadProcessId(hTrayWnd, out var trayPid);
var hProcess = InteropMethods.OpenProcess(InteropValues.ProcessAccess.VMOperation | InteropValues.ProcessAccess.VMRead | InteropValues.ProcessAccess.VMWrite, false, trayPid);
var address = InteropMethods.VirtualAllocEx(hProcess, IntPtr.Zero, 1024, InteropValues.AllocationType.Commit, InteropValues.MemoryProtection.ReadWrite);
var btnData = new NativeMethods.TBBUTTON();
var trayData = new NativeMethods.TRAYDATA();
var btnData = new InteropValues.TBBUTTON();
var trayData = new InteropValues.TRAYDATA();
var handel = Process.GetCurrentProcess().Id;
for (uint i = 0; i < count; i++)
{
NativeMethods.SendMessage(hTrayWnd, NativeMethods.TB_GETBUTTON, i, address);
var isTrue = NativeMethods.ReadProcessMemory(hProcess, address, out btnData, Marshal.SizeOf(btnData), out _);
InteropMethods.SendMessage(hTrayWnd, InteropValues.TB_GETBUTTON, i, address);
var isTrue = InteropMethods.ReadProcessMemory(hProcess, address, out btnData, Marshal.SizeOf(btnData), out _);
if (!isTrue) continue;
if (btnData.dwData == IntPtr.Zero)
{
btnData.dwData = btnData.iString;
}
NativeMethods.ReadProcessMemory(hProcess, btnData.dwData, out trayData, Marshal.SizeOf(trayData), out _);
NativeMethods.GetWindowThreadProcessId(trayData.hwnd, out var dwProcessId);
InteropMethods.ReadProcessMemory(hProcess, btnData.dwData, out trayData, Marshal.SizeOf(trayData), out _);
InteropMethods.GetWindowThreadProcessId(trayData.hwnd, out var dwProcessId);
if (dwProcessId == (uint)handel)
{
var rect = new NativeMethods.RECT();
var lngRect = NativeMethods.VirtualAllocEx(hProcess, IntPtr.Zero, Marshal.SizeOf(typeof(Rect)), NativeMethods.AllocationType.Commit, NativeMethods.MemoryProtection.ReadWrite);
NativeMethods.SendMessage(hTrayWnd, NativeMethods.TB_GETITEMRECT, i, lngRect);
NativeMethods.ReadProcessMemory(hProcess, lngRect, out rect, Marshal.SizeOf(rect), out _);
var rect = new InteropValues.RECT();
var lngRect = InteropMethods.VirtualAllocEx(hProcess, IntPtr.Zero, Marshal.SizeOf(typeof(Rect)), InteropValues.AllocationType.Commit, InteropValues.MemoryProtection.ReadWrite);
InteropMethods.SendMessage(hTrayWnd, InteropValues.TB_GETITEMRECT, i, lngRect);
InteropMethods.ReadProcessMemory(hProcess, lngRect, out rect, Marshal.SizeOf(rect), out _);
NativeMethods.VirtualFreeEx(hProcess, lngRect, Marshal.SizeOf(rect), NativeMethods.FreeType.Decommit);
NativeMethods.VirtualFreeEx(hProcess, lngRect, 0, NativeMethods.FreeType.Release);
InteropMethods.VirtualFreeEx(hProcess, lngRect, Marshal.SizeOf(rect), InteropValues.FreeType.Decommit);
InteropMethods.VirtualFreeEx(hProcess, lngRect, 0, InteropValues.FreeType.Release);
var left = rectTray.Left + rect.Left;
var top = rectTray.Top + rect.Top;
var botton = rectTray.Top + rect.Bottom;
var right = rectTray.Left + rect.Right;
rectNotify = new NativeMethods.RECT
rectNotify = new InteropValues.RECT
{
Left = left,
Right = right,
@@ -464,9 +461,9 @@ namespace HandyControl.Controls
break;
}
}
NativeMethods.VirtualFreeEx(hProcess, address, 0x4096, NativeMethods.FreeType.Decommit);
NativeMethods.VirtualFreeEx(hProcess, address, 0, NativeMethods.FreeType.Release);
NativeMethods.CloseHandle(hProcess);
InteropMethods.VirtualFreeEx(hProcess, address, 0x4096, InteropValues.FreeType.Decommit);
InteropMethods.VirtualFreeEx(hProcess, address, 0, InteropValues.FreeType.Release);
InteropMethods.CloseHandle(hProcess);
}
return isFind;
}
@@ -496,13 +493,13 @@ namespace HandyControl.Controls
if (DesignerHelper.IsInDesignMode) return;
_isTransparent = isTransparent;
var data = new NOTIFYICONDATA
var data = new InteropValues.NOTIFYICONDATA
{
uCallbackMessage = WmTrayMouseMessage,
uFlags = NativeMethods.NIF_MESSAGE | NativeMethods.NIF_ICON | NativeMethods.NIF_TIP,
uFlags = InteropValues.NIF_MESSAGE | InteropValues.NIF_ICON | InteropValues.NIF_TIP,
hWnd = _messageWindowHandle,
uID = _id,
dwInfoFlags = NativeMethods.NIF_TIP,
dwInfoFlags = InteropValues.NIF_TIP,
hIcon = isTransparent ? IntPtr.Zero : _iconCurrentHandle,
szTip = Text
};
@@ -511,17 +508,17 @@ namespace HandyControl.Controls
{
if (!_added)
{
UnsafeNativeMethods.Shell_NotifyIcon(NativeMethods.NIM_ADD, data);
InteropMethods.Shell_NotifyIcon(InteropValues.NIM_ADD, data);
_added = true;
}
else
{
UnsafeNativeMethods.Shell_NotifyIcon(NativeMethods.NIM_MODIFY, data);
InteropMethods.Shell_NotifyIcon(InteropValues.NIM_MODIFY, data);
}
}
else if (_added)
{
UnsafeNativeMethods.Shell_NotifyIcon(NativeMethods.NIM_DELETE, data);
InteropMethods.Shell_NotifyIcon(InteropValues.NIM_DELETE, data);
_added = false;
}
}
@@ -530,7 +527,7 @@ namespace HandyControl.Controls
private void RegisterClass()
{
_windowClassName = $"HandyControl.Controls.NotifyIcon{Guid.NewGuid()}";
var wndclass = new WNDCLASS
var wndclass = new InteropValues.WNDCLASS4ICON
{
style = 0,
lpfnWndProc = _callback,
@@ -544,9 +541,9 @@ namespace HandyControl.Controls
lpszClassName = _windowClassName
};
UnsafeNativeMethods.RegisterClass(wndclass);
_wmTaskbarCreated = NativeMethods.RegisterWindowMessage("TaskbarCreated");
_messageWindowHandle = UnsafeNativeMethods.CreateWindowEx(0, _windowClassName, "", 0, 0, 0, 1, 1,
InteropMethods.RegisterClass(wndclass);
_wmTaskbarCreated = InteropMethods.RegisterWindowMessage("TaskbarCreated");
_messageWindowHandle = InteropMethods.CreateWindowEx(0, _windowClassName, "", 0, 0, 0, 1, 1,
IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
}
@@ -562,17 +559,17 @@ namespace HandyControl.Controls
{
switch (lparam.ToInt64())
{
case NativeMethods.WM_LBUTTONDBLCLK:
case InteropValues.WM_LBUTTONDBLCLK:
WmMouseDown(MouseButton.Left, 2);
break;
case NativeMethods.WM_LBUTTONUP:
case InteropValues.WM_LBUTTONUP:
WmMouseUp(MouseButton.Left);
break;
case NativeMethods.WM_RBUTTONUP:
case InteropValues.WM_RBUTTONUP:
ShowContextMenu();
WmMouseUp(MouseButton.Right);
break;
case NativeMethods.WM_MOUSEMOVE:
case InteropValues.WM_MOUSEMOVE:
if (!_dispatcherTimerPos.IsEnabled)
{
_dispatcherTimerPos.Interval = TimeSpan.FromMilliseconds(200);
@@ -583,7 +580,7 @@ namespace HandyControl.Controls
}
}
return UnsafeNativeMethods.DefWindowProc(hWnd, msg, wparam, lparam);
return InteropMethods.DefWindowProc(hWnd, msg, wparam, lparam);
}
private void WmMouseDown(MouseButton button, int clicks)
@@ -632,7 +629,7 @@ namespace HandyControl.Controls
Content = ContextContent
};
_contextContent.IsOpen = true;
UnsafeNativeMethods.SetForegroundWindow(_contextContent.Child.GetHandle());
InteropMethods.SetForegroundWindow(_contextContent.Child.GetHandle());
}
else if (ContextMenu != null)
{
@@ -655,7 +652,7 @@ namespace HandyControl.Controls
ContextMenu.Placement = PlacementMode.Mouse;
ContextMenu.IsOpen = true;
UnsafeNativeMethods.SetForegroundWindow(ContextMenu.GetHandle());
InteropMethods.SetForegroundWindow(ContextMenu.GetHandle());
}
}
@@ -2,9 +2,11 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Markup;
using HandyControl.Data;
namespace HandyControl.Controls
@@ -63,6 +65,7 @@ namespace HandyControl.Controls
public static void SetAlignLeftWith(DependencyObject element, UIElement value)
=> element.SetValue(AlignLeftWithProperty, value);
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignLeftWith(DependencyObject element)
=> (UIElement) element.GetValue(AlignLeftWithProperty);
@@ -72,6 +75,7 @@ namespace HandyControl.Controls
public static void SetAlignTopWith(DependencyObject element, UIElement value)
=> element.SetValue(AlignTopWithProperty, value);
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignTopWith(DependencyObject element)
=> (UIElement) element.GetValue(AlignTopWithProperty);
@@ -81,6 +85,7 @@ namespace HandyControl.Controls
public static void SetAlignRightWith(DependencyObject element, UIElement value)
=> element.SetValue(AlignRightWithProperty, value);
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignRightWith(DependencyObject element)
=> (UIElement) element.GetValue(AlignRightWithProperty);
@@ -90,6 +95,7 @@ namespace HandyControl.Controls
public static void SetAlignBottomWith(DependencyObject element, UIElement value)
=> element.SetValue(AlignBottomWithProperty, value);
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignBottomWith(DependencyObject element)
=> (UIElement) element.GetValue(AlignBottomWithProperty);
@@ -103,6 +109,7 @@ namespace HandyControl.Controls
public static void SetLeftOf(DependencyObject element, UIElement value)
=> element.SetValue(LeftOfProperty, value);
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetLeftOf(DependencyObject element)
=> (UIElement)element.GetValue(LeftOfProperty);
@@ -112,6 +119,7 @@ namespace HandyControl.Controls
public static void SetAbove(DependencyObject element, UIElement value)
=> element.SetValue(AboveProperty, value);
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAbove(DependencyObject element)
=> (UIElement)element.GetValue(AboveProperty);
@@ -121,6 +129,7 @@ namespace HandyControl.Controls
public static void SetRightOf(DependencyObject element, UIElement value)
=> element.SetValue(RightOfProperty, value);
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetRightOf(DependencyObject element)
=> (UIElement)element.GetValue(RightOfProperty);
@@ -130,6 +139,7 @@ namespace HandyControl.Controls
public static void SetBelow(DependencyObject element, UIElement value)
=> element.SetValue(BelowProperty, value);
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetBelow(DependencyObject element)
=> (UIElement) element.GetValue(BelowProperty);
@@ -161,6 +171,7 @@ namespace HandyControl.Controls
public static void SetAlignHorizontalCenterWith(DependencyObject element, UIElement value)
=> element.SetValue(AlignHorizontalCenterWithProperty, value);
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignHorizontalCenterWith(DependencyObject element)
=> (UIElement)element.GetValue(AlignHorizontalCenterWithProperty);
@@ -170,6 +181,7 @@ namespace HandyControl.Controls
public static void SetAlignVerticalCenterWith(DependencyObject element, UIElement value)
=> element.SetValue(AlignVerticalCenterWithProperty, value);
[TypeConverter(typeof(NameReferenceConverter))]
public static UIElement GetAlignVerticalCenterWith(DependencyObject element)
=> (UIElement)element.GetValue(AlignVerticalCenterWithProperty);
@@ -8,6 +8,10 @@ namespace HandyControl.Controls
{
public class FlipClock : Control
{
private readonly DispatcherTimer _dispatcherTimer;
private bool _isDisposed;
public static readonly DependencyProperty NumberListProperty = DependencyProperty.Register(
"NumberList", typeof(List<int>), typeof(FlipClock), new PropertyMetadata(new List<int> {0, 0, 0, 0, 0, 0}));
@@ -44,12 +48,39 @@ namespace HandyControl.Controls
public FlipClock()
{
var dispatcherTimer = new DispatcherTimer
_dispatcherTimer = new DispatcherTimer(DispatcherPriority.Render)
{
Interval = TimeSpan.FromMilliseconds(200)
};
dispatcherTimer.Tick += DispatcherTimer_Tick;
dispatcherTimer.Start();
IsVisibleChanged += FlipClock_IsVisibleChanged;
}
~FlipClock() => Dispose();
public void Dispose()
{
if (_isDisposed) return;
IsVisibleChanged -= FlipClock_IsVisibleChanged;
_dispatcherTimer.Stop();
_isDisposed = true;
GC.SuppressFinalize(this);
}
private void FlipClock_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (IsVisible)
{
_dispatcherTimer.Tick += DispatcherTimer_Tick;
_dispatcherTimer.Start();
}
else
{
_dispatcherTimer.Stop();
_dispatcherTimer.Tick -= DispatcherTimer_Tick;
}
}
private void DispatcherTimer_Tick(object sender, EventArgs e) => DisplayTime = DateTime.Now;
@@ -1,4 +1,5 @@
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Media;
using HandyControl.Data;
using HandyControl.Tools;
@@ -7,6 +8,11 @@ namespace HandyControl.Controls
{
public class BlurWindow : Window
{
static BlurWindow()
{
StyleProperty.OverrideMetadata(typeof(BlurWindow), new FrameworkPropertyMetadata(Application.Current.FindResource(ResourceToken.WindowBlur)));
}
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
@@ -0,0 +1,472 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Threading;
using HandyControl.Data;
using HandyControl.Expression.Drawing;
using HandyControl.Tools;
using HandyControl.Tools.Interop;
namespace HandyControl.Controls
{
public class GlowWindow : Window
{
internal int DeferGlowChangesCount;
private readonly GlowEdge[] _glowEdges = new GlowEdge[4];
private DispatcherTimer _makeGlowVisibleTimer;
private bool _isGlowVisible;
private bool _useLogicalSizeForRestore;
private bool _updatingZOrder;
private Rect _logicalSizeForRestore = Rect.Empty;
public static readonly DependencyProperty ActiveGlowColorProperty = DependencyProperty.Register(
"ActiveGlowColor", typeof(Color), typeof(GlowWindow), new PropertyMetadata(default(Color), OnGlowColorChanged));
public Color ActiveGlowColor
{
get => (Color)GetValue(ActiveGlowColorProperty);
set => SetValue(ActiveGlowColorProperty, value);
}
public static readonly DependencyProperty InactiveGlowColorProperty = DependencyProperty.Register(
"InactiveGlowColor", typeof(Color), typeof(GlowWindow), new PropertyMetadata(default(Color), OnGlowColorChanged));
public Color InactiveGlowColor
{
get => (Color)GetValue(InactiveGlowColorProperty);
set => SetValue(InactiveGlowColorProperty, value);
}
static GlowWindow()
{
StyleProperty.OverrideMetadata(typeof(GlowWindow), new FrameworkPropertyMetadata(Application.Current.FindResource(ResourceToken.WindowGlow)));
ResizeModeProperty.OverrideMetadata(typeof(GlowWindow), new FrameworkPropertyMetadata(OnResizeModeChanged));
}
#region internal
internal void EndDeferGlowChanges()
{
foreach (var current in LoadedGlowWindows) current.CommitChanges();
}
#endregion
#region protected
protected virtual bool ShouldShowGlow
{
get
{
var handle = this.GetHandle();
return InteropMethods.IsWindowVisible(handle) && !InteropMethods.IsIconic(handle) &&
!InteropMethods.IsZoomed(handle) && ResizeMode != ResizeMode.NoResize;
}
}
protected virtual IntPtr HwndSourceHook(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
if (msg <= InteropValues.WM_WINDOWPOSCHANGED)
{
if (msg == InteropValues.WM_ACTIVATE)
{
return IntPtr.Zero;
}
if (msg != InteropValues.WM_QUIT)
{
switch (msg)
{
case InteropValues.WM_WINDOWPOSCHANGING:
WmWindowPosChanging(lParam);
return IntPtr.Zero;
case InteropValues.WM_WINDOWPOSCHANGED:
WmWindowPosChanged(lParam);
return IntPtr.Zero;
default:
return IntPtr.Zero;
}
}
}
else
{
if (msg <= InteropValues.WM_NCRBUTTONDBLCLK)
{
switch (msg)
{
case InteropValues.WM_SETICON:
break;
case InteropValues.WM_NCCREATE:
case InteropValues.WM_NCDESTROY:
return IntPtr.Zero;
case InteropValues.WM_NCACTIVATE:
handled = true;
return WmNcActivate(hWnd, wParam);
default:
switch (msg)
{
case InteropValues.WM_NCRBUTTONDOWN:
case InteropValues.WM_NCRBUTTONUP:
case InteropValues.WM_NCRBUTTONDBLCLK:
handled = true;
return IntPtr.Zero;
default:
return IntPtr.Zero;
}
}
}
else
{
switch (msg)
{
case InteropValues.WM_NCUAHDRAWCAPTION:
case InteropValues.WM_NCUAHDRAWFRAME:
handled = true;
return IntPtr.Zero;
default:
if (msg != InteropValues.WM_SYSCOMMAND) return IntPtr.Zero;
WmSysCommand(hWnd, wParam);
return IntPtr.Zero;
}
}
}
handled = true;
return CallDefWindowProcWithoutVisibleStyle(hWnd, msg, wParam, lParam);
}
protected override void OnActivated(EventArgs e)
{
UpdateGlowActiveState();
base.OnActivated(e);
}
protected override void OnDeactivated(EventArgs e)
{
UpdateGlowActiveState();
base.OnDeactivated(e);
}
protected override void OnClosed(EventArgs e)
{
StopTimer();
DestroyGlowWindows();
base.OnClosed(e);
}
protected override void OnSourceInitialized(EventArgs e)
{
var hwndSource = HwndSource.FromHwnd(new WindowInteropHelper(this).Handle);
if (hwndSource != null)
{
hwndSource.AddHook(HwndSourceHook);
CreateGlowWindowHandles();
}
base.OnSourceInitialized(e);
}
#endregion
#region private
private IEnumerable<GlowEdge> LoadedGlowWindows => from w in _glowEdges where w != null select w;
private bool IsGlowVisible
{
get => _isGlowVisible;
set
{
if (_isGlowVisible != value)
{
_isGlowVisible = value;
for (var i = 0; i < _glowEdges.Length; i++)
{
GetOrCreateGlowWindow(i).IsVisible = value;
}
}
}
}
private GlowEdge GetOrCreateGlowWindow(int direction)
{
return _glowEdges[direction] ?? (_glowEdges[direction] = new GlowEdge(this, (Dock)direction)
{
ActiveGlowColor = ActiveGlowColor,
InactiveGlowColor = InactiveGlowColor,
IsActive = IsActive
});
}
private static void OnResizeModeChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
{
var customChromeWindow = (GlowWindow)obj;
customChromeWindow.UpdateGlowVisibility(false);
}
private static void OnGlowColorChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) => ((GlowWindow)obj).UpdateGlowColors();
private void UpdateGlowColors()
{
using (DeferGlowChanges())
{
foreach (var current in LoadedGlowWindows)
{
current.ActiveGlowColor = ActiveGlowColor;
current.InactiveGlowColor = InactiveGlowColor;
}
}
}
private void UpdateGlowVisibility(bool delayIfNecessary)
{
var shouldShowGlow = ShouldShowGlow;
if (shouldShowGlow != IsGlowVisible)
{
if (SystemParameters.MinimizeAnimation && shouldShowGlow && delayIfNecessary)
{
if (_makeGlowVisibleTimer != null)
{
_makeGlowVisibleTimer.Stop();
}
else
{
_makeGlowVisibleTimer = new DispatcherTimer
{
Interval = TimeSpan.FromMilliseconds(200.0)
};
_makeGlowVisibleTimer.Tick += OnDelayedVisibilityTimerTick;
}
_makeGlowVisibleTimer.Start();
return;
}
StopTimer();
IsGlowVisible = shouldShowGlow;
}
}
private void StopTimer()
{
if (_makeGlowVisibleTimer != null)
{
_makeGlowVisibleTimer.Stop();
_makeGlowVisibleTimer.Tick -= OnDelayedVisibilityTimerTick;
_makeGlowVisibleTimer = null;
}
}
private void OnDelayedVisibilityTimerTick(object sender, EventArgs e)
{
StopTimer();
UpdateGlowWindowPositions(false);
}
private void UpdateGlowWindowPositions(bool delayIfNecessary)
{
using (DeferGlowChanges())
{
UpdateGlowVisibility(delayIfNecessary);
foreach (var current in LoadedGlowWindows) current.UpdateWindowPos();
}
}
private IDisposable DeferGlowChanges() => new ChangeScope(this);
private void UpdateGlowActiveState()
{
using (DeferGlowChanges())
{
foreach (var current in LoadedGlowWindows)
{
current.IsActive = IsActive;
}
}
}
private void DestroyGlowWindows()
{
for (var i = 0; i < _glowEdges.Length; i++)
{
using (_glowEdges[i])
{
_glowEdges[i] = null;
}
}
}
private void WmWindowPosChanging(IntPtr lParam)
{
var windowpos = (InteropValues.WINDOWPOS)Marshal.PtrToStructure(lParam, typeof(InteropValues.WINDOWPOS));
if ((windowpos.flags & 2u) == 0u && (windowpos.flags & 1u) == 0u && windowpos.cx > 0 && windowpos.cy > 0)
{
var rect = new Rect(windowpos.x, windowpos.y, windowpos.cx, windowpos.cy);
rect = rect.DeviceToLogicalUnits();
if (_useLogicalSizeForRestore)
{
rect = _logicalSizeForRestore;
_logicalSizeForRestore = Rect.Empty;
_useLogicalSizeForRestore = false;
}
var logicalRect = GetOnScreenPosition(rect);
logicalRect = logicalRect.LogicalToDeviceUnits();
windowpos.x = (int)logicalRect.X;
windowpos.y = (int)logicalRect.Y;
Marshal.StructureToPtr(windowpos, lParam, true);
}
}
private void UpdateZOrderOfOwner(IntPtr hwndOwner)
{
var lastOwnedWindow = IntPtr.Zero;
InteropMethods.EnumThreadWindows(InteropMethods.GetCurrentThreadId(), delegate (IntPtr hwnd, IntPtr lParam)
{
if (InteropMethods.GetWindow(hwnd, 4) == hwndOwner) lastOwnedWindow = hwnd;
return true;
}, IntPtr.Zero);
if (lastOwnedWindow != IntPtr.Zero && InteropMethods.GetWindow(hwndOwner, 3) != lastOwnedWindow)
InteropMethods.SetWindowPos(hwndOwner, lastOwnedWindow, 0, 0, 0, 0, 19);
}
private void UpdateZOrderOfThisAndOwner()
{
if (_updatingZOrder) return;
try
{
_updatingZOrder = true;
var windowInteropHelper = new WindowInteropHelper(this);
var handle = windowInteropHelper.Handle;
foreach (var current in LoadedGlowWindows)
{
var window = InteropMethods.GetWindow(current.Handle, 3);
if (window != handle) InteropMethods.SetWindowPos(current.Handle, handle, 0, 0, 0, 0, 19);
handle = current.Handle;
}
var owner = windowInteropHelper.Owner;
if (owner != IntPtr.Zero) UpdateZOrderOfOwner(owner);
}
finally
{
_updatingZOrder = false;
}
}
private void WmWindowPosChanged(IntPtr lParam)
{
try
{
var windowpos = (InteropValues.WINDOWPOS)Marshal.PtrToStructure(lParam, typeof(InteropValues.WINDOWPOS));
UpdateGlowWindowPositions((windowpos.flags & 64u) == 0u);
UpdateZOrderOfThisAndOwner();
}
catch
{
// ignored
}
}
private Rect GetOnScreenPosition(Rect floatRect)
{
var result = floatRect;
floatRect = floatRect.LogicalToDeviceUnits();
ScreenHelper.FindMaximumSingleMonitorRectangle(floatRect, out _, out var rect2);
if (!floatRect.IntersectsWith(rect2))
{
ScreenHelper.FindMonitorRectsFromPoint(InteropMethods.GetCursorPos(), out _, out rect2);
rect2 = rect2.DeviceToLogicalUnits();
if (result.Width > rect2.Width) result.Width = rect2.Width;
if (result.Height > rect2.Height) result.Height = rect2.Height;
if (rect2.Right <= result.X) result.X = rect2.Right - result.Width;
if (rect2.Left > result.X + result.Width) result.X = rect2.Left;
if (rect2.Bottom <= result.Y) result.Y = rect2.Bottom - result.Height;
if (rect2.Top > result.Y + result.Height) result.Y = rect2.Top;
}
return result;
}
private static InteropValues.MONITORINFO MonitorInfoFromWindow(IntPtr hWnd)
{
var hMonitor = InteropMethods.MonitorFromWindow(hWnd, 2);
var result = default(InteropValues.MONITORINFO);
result.cbSize = (uint)Marshal.SizeOf(typeof(InteropValues.MONITORINFO));
InteropMethods.GetMonitorInfo(hMonitor, ref result);
return result;
}
private IntPtr WmNcActivate(IntPtr hWnd, IntPtr wParam) => InteropMethods.DefWindowProc(hWnd, InteropValues.WM_NCACTIVATE, wParam, InteropMethods.HRGN_NONE);
private bool IsAeroSnappedToMonitor(IntPtr hWnd)
{
var monitorinfo = MonitorInfoFromWindow(hWnd);
var logicalRect = new Rect(Left, Top, Width, Height);
logicalRect = logicalRect.LogicalToDeviceUnits();
return MathHelper.AreClose(monitorinfo.rcWork.Height, logicalRect.Height) && MathHelper.AreClose(monitorinfo.rcWork.Top, logicalRect.Top);
}
private void WmSysCommand(IntPtr hWnd, IntPtr wParam)
{
var num = InteropMethods.GET_SC_WPARAM(wParam);
if (num == InteropValues.SC_MOVE)
{
InteropMethods.RedrawWindow(hWnd, IntPtr.Zero, IntPtr.Zero,
InteropValues.RedrawWindowFlags.Invalidate | InteropValues.RedrawWindowFlags.NoChildren |
InteropValues.RedrawWindowFlags.UpdateNow | InteropValues.RedrawWindowFlags.Frame);
}
if ((num == InteropValues.SC_MAXIMIZE || num == InteropValues.SC_MINIMIZE || num == InteropValues.SC_MOVE ||
num == InteropValues.SC_SIZE) && WindowState == WindowState.Normal && !IsAeroSnappedToMonitor(hWnd))
{
_logicalSizeForRestore = new Rect(Left, Top, Width, Height);
}
if (num == InteropValues.SC_MOVE && WindowState == WindowState.Maximized && _logicalSizeForRestore == Rect.Empty)
{
_logicalSizeForRestore = new Rect(Left, Top, Width, Height);
}
if (num == InteropValues.SC_RESTORE && WindowState != WindowState.Minimized &&
_logicalSizeForRestore.Width > 0.0 && _logicalSizeForRestore.Height > 0.0)
{
Left = _logicalSizeForRestore.Left;
Top = _logicalSizeForRestore.Top;
Width = _logicalSizeForRestore.Width;
Height = _logicalSizeForRestore.Height;
_useLogicalSizeForRestore = true;
}
}
private IntPtr CallDefWindowProcWithoutVisibleStyle(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam)
{
var flag = VisualHelper.ModifyStyle(hWnd, InteropValues.WS_VISIBLE, 0);
var result = InteropMethods.DefWindowProc(hWnd, msg, wParam, lParam);
if (flag) VisualHelper.ModifyStyle(hWnd, 0, InteropValues.WS_VISIBLE);
return result;
}
private void CreateGlowWindowHandles()
{
for (var i = 0; i < _glowEdges.Length; i++) GetOrCreateGlowWindow(i).EnsureHandle();
}
#endregion
}
}
@@ -63,7 +63,7 @@ namespace HandyControl.Controls
public static readonly DependencyProperty NonClientAreaHeightProperty = DependencyProperty.Register(
"NonClientAreaHeight", typeof(double), typeof(Window),
new PropertyMetadata(26.0));
new PropertyMetadata(22.0));
public static readonly DependencyProperty ShowNonClientAreaProperty = DependencyProperty.Register(
"ShowNonClientArea", typeof(bool), typeof(Window),
@@ -80,8 +80,6 @@ namespace HandyControl.Controls
private Thickness _actualBorderThickness;
private UIElement _nonClientArea;
private bool _showNonClientArea = true;
private double _tempNonClientAreaHeight;
@@ -92,6 +90,13 @@ namespace HandyControl.Controls
private ResizeMode _tempResizeMode;
private UIElement _nonClientArea;
static Window()
{
StyleProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(Application.Current.FindResource(ResourceToken.WindowWin10)));
}
public Window()
{
#if netle40
@@ -7,6 +7,6 @@ namespace HandyControl.Data
{
public MouseHookMessageType Message { get; set; }
public NativeMethods.POINT Point { get; set; }
public InteropValues.POINT Point { get; set; }
}
}
@@ -0,0 +1,69 @@
using System;
namespace HandyControl.Data
{
public class DisposableObject : IDisposable
{
private EventHandler _disposing;
public bool IsDisposed { get; private set; }
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
~DisposableObject()
{
Dispose(false);
}
public event EventHandler Disposing
{
add
{
ThrowIfDisposed();
_disposing += value;
}
remove
{
_disposing -= value;
}
}
protected void ThrowIfDisposed()
{
if (IsDisposed) throw new ObjectDisposedException(GetType().Name);
}
protected void Dispose(bool disposing)
{
if (IsDisposed) return;
try
{
if (disposing)
{
_disposing?.Invoke(this, EventArgs.Empty);
_disposing = null;
DisposeManagedResources();
}
DisposeNativeResources();
}
finally
{
IsDisposed = true;
}
}
protected virtual void DisposeManagedResources()
{
}
protected virtual void DisposeNativeResources()
{
}
}
}
@@ -0,0 +1,21 @@
using HandyControl.Controls;
namespace HandyControl.Data
{
internal class ChangeScope : DisposableObject
{
private readonly GlowWindow _window;
public ChangeScope(GlowWindow window)
{
_window = window;
_window.DeferGlowChangesCount++;
}
protected override void DisposeManagedResources()
{
_window.DeferGlowChangesCount--;
if (_window.DeferGlowChangesCount == 0) _window.EndDeferGlowChanges();
}
}
}
@@ -0,0 +1,114 @@
using System;
using System.Runtime.InteropServices;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using HandyControl.Tools.Interop;
namespace HandyControl.Data
{
internal class GlowBitmap : DisposableObject
{
internal const int GlowBitmapPartCount = 16;
private const int BytesPerPixelBgra32 = 4;
private static readonly CachedBitmapInfo[] _transparencyMasks = new CachedBitmapInfo[GlowBitmapPartCount];
private readonly InteropValues.BITMAPINFO _bitmapInfo;
private readonly IntPtr _pbits;
internal GlowBitmap(IntPtr hdcScreen, int width, int height)
{
_bitmapInfo.biSize = Marshal.SizeOf(typeof(InteropValues.BITMAPINFOHEADER));
_bitmapInfo.biPlanes = 1;
_bitmapInfo.biBitCount = 32;
_bitmapInfo.biCompression = 0;
_bitmapInfo.biXPelsPerMeter = 0;
_bitmapInfo.biYPelsPerMeter = 0;
_bitmapInfo.biWidth = width;
_bitmapInfo.biHeight = -height;
Handle = InteropMethods.CreateDIBSection(
hdcScreen,
ref _bitmapInfo,
0u,
out _pbits,
IntPtr.Zero,
0u);
}
internal IntPtr Handle { get; }
internal IntPtr DIBits => _pbits;
internal int Width => _bitmapInfo.biWidth;
internal int Height => -_bitmapInfo.biHeight;
protected override void DisposeNativeResources() => InteropMethods.DeleteObject(Handle);
private static byte PremultiplyAlpha(byte channel, byte alpha) => (byte)(channel * alpha / 255.0);
internal static GlowBitmap Create(GlowDrawingContext drawingContext, GlowBitmapPart bitmapPart, Color color)
{
var orCreateAlphaMask =
GetOrCreateAlphaMask(bitmapPart);
var glowBitmap =
new GlowBitmap(
drawingContext.ScreenDC,
orCreateAlphaMask.Width,
orCreateAlphaMask.Height);
for (var i = 0; i < orCreateAlphaMask.DIBits.Length; i += BytesPerPixelBgra32)
{
var b = orCreateAlphaMask.DIBits[i + 3];
var val = PremultiplyAlpha(color.R, b);
var val2 = PremultiplyAlpha(color.G, b);
var val3 = PremultiplyAlpha(color.B, b);
Marshal.WriteByte(glowBitmap.DIBits, i, val3);
Marshal.WriteByte(glowBitmap.DIBits, i + 1, val2);
Marshal.WriteByte(glowBitmap.DIBits, i + 2, val);
Marshal.WriteByte(glowBitmap.DIBits, i + 3, b);
}
return glowBitmap;
}
private static CachedBitmapInfo GetOrCreateAlphaMask(GlowBitmapPart bitmapPart)
{
if (_transparencyMasks[(int)bitmapPart] == null)
{
var bitmapImage = new BitmapImage(new Uri($"pack://application:,,,/HandyControl;Component/Resources/Images/GlowWindow/{bitmapPart}.png"));
var array = new byte[BytesPerPixelBgra32 * bitmapImage.PixelWidth * bitmapImage.PixelHeight];
var stride = BytesPerPixelBgra32 * bitmapImage.PixelWidth;
bitmapImage.CopyPixels(array, stride, 0);
bitmapImage.Freeze();
_transparencyMasks[(int)bitmapPart] =
new CachedBitmapInfo(
array,
bitmapImage.PixelWidth,
bitmapImage.PixelHeight);
}
return _transparencyMasks[(int)bitmapPart];
}
private sealed class CachedBitmapInfo
{
internal readonly byte[] DIBits;
internal readonly int Height;
internal readonly int Width;
internal CachedBitmapInfo(byte[] diBits, int width, int height)
{
Width = width;
Height = height;
DIBits = diBits;
}
}
}
}
@@ -0,0 +1,22 @@
namespace HandyControl.Data
{
internal enum GlowBitmapPart
{
CornerTopLeft,
CornerTopRight,
CornerBottomLeft,
CornerBottomRight,
TopLeft,
Top,
TopRight,
LeftTop,
Left,
LeftBottom,
BottomLeft,
Bottom,
BottomRight,
RightTop,
Right,
RightBottom
}
}
@@ -0,0 +1,51 @@
using System;
using HandyControl.Tools.Interop;
namespace HandyControl.Data
{
internal class GlowDrawingContext : DisposableObject
{
private readonly GlowBitmap _windowBitmap;
internal InteropValues.BLENDFUNCTION Blend;
internal GlowDrawingContext(int width, int height)
{
ScreenDC = InteropMethods.GetDC(IntPtr.Zero);
if (ScreenDC == IntPtr.Zero) return;
WindowDC = InteropMethods.CreateCompatibleDC(ScreenDC);
if (WindowDC == IntPtr.Zero) return;
BackgroundDC = InteropMethods.CreateCompatibleDC(ScreenDC);
if (BackgroundDC == IntPtr.Zero) return;
Blend.BlendOp = 0;
Blend.BlendFlags = 0;
Blend.SourceConstantAlpha = 255;
Blend.AlphaFormat = 1;
_windowBitmap = new GlowBitmap(ScreenDC, width, height);
InteropMethods.SelectObject(WindowDC, _windowBitmap.Handle);
}
internal bool IsInitialized =>
ScreenDC != IntPtr.Zero && WindowDC != IntPtr.Zero &&
BackgroundDC != IntPtr.Zero && _windowBitmap != null;
internal IntPtr ScreenDC { get; }
internal IntPtr WindowDC { get; }
internal IntPtr BackgroundDC { get; }
internal int Width => _windowBitmap.Width;
internal int Height => _windowBitmap.Height;
protected override void DisposeManagedResources() => _windowBitmap.Dispose();
protected override void DisposeNativeResources()
{
if (ScreenDC != IntPtr.Zero) InteropMethods.ReleaseDC(IntPtr.Zero, ScreenDC);
if (WindowDC != IntPtr.Zero) InteropMethods.DeleteDC(WindowDC);
if (BackgroundDC != IntPtr.Zero) InteropMethods.DeleteDC(BackgroundDC);
}
}
}
@@ -0,0 +1,587 @@
using System;
using System.Runtime.InteropServices;
using System.Windows.Controls;
using System.Windows.Interop;
using System.Windows.Media;
using HandyControl.Controls;
using HandyControl.Tools.Interop;
namespace HandyControl.Data
{
internal class GlowEdge : HwndWrapper
{
private const string GlowEdgeClassName = "HandyControlGlowEdge";
private const int GlowDepth = 9;
private const int CornerGripThickness = 18;
private static ushort _sharedWindowClassAtom;
// ReSharper disable once NotAccessedField.Local
private static InteropValues.WndProc _sharedWndProc;
private readonly GlowBitmap[] _activeGlowBitmaps = new GlowBitmap[16];
private readonly GlowBitmap[] _inactiveGlowBitmaps = new GlowBitmap[16];
private readonly Dock _orientation;
private readonly GlowWindow _targetWindow;
private Color _activeGlowColor = Colors.Transparent;
private int _height;
private Color _inactiveGlowColor = Colors.Transparent;
private FieldInvalidationTypes _invalidatedValues;
private bool _isActive;
private bool _isVisible;
private int _left;
private bool _pendingDelayRender;
private int _top;
private int _width;
internal static long CreatedGlowEdges { get; private set; }
internal static long DisposedGlowEdges { get; private set; }
internal GlowEdge(GlowWindow owner, Dock orientation)
{
_targetWindow = owner ?? throw new ArgumentNullException(nameof(owner));
_orientation = orientation;
CreatedGlowEdges += 1L;
}
private bool IsDeferringChanges => _targetWindow.DeferGlowChangesCount > 0;
private static ushort SharedWindowClassAtom
{
get
{
if (_sharedWindowClassAtom == 0)
{
var wndclass = default(InteropValues.WNDCLASS);
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hbrBackground = IntPtr.Zero;
wndclass.hCursor = IntPtr.Zero;
wndclass.hIcon = IntPtr.Zero;
wndclass.lpfnWndProc = _sharedWndProc = InteropMethods.DefWindowProc;
wndclass.lpszClassName = GlowEdgeClassName;
wndclass.lpszMenuName = null;
wndclass.style = 0u;
_sharedWindowClassAtom = InteropMethods.RegisterClass(ref wndclass);
}
return _sharedWindowClassAtom;
}
}
internal bool IsVisible
{
get => _isVisible;
set => UpdateProperty(ref _isVisible, value, FieldInvalidationTypes.Render | FieldInvalidationTypes.Visibility);
}
internal int Left
{
get => _left;
set => UpdateProperty(ref _left, value, FieldInvalidationTypes.Location);
}
internal int Top
{
get => _top;
set => UpdateProperty(ref _top, value, FieldInvalidationTypes.Location);
}
internal int Width
{
get => _width;
set => UpdateProperty( ref _width, value, FieldInvalidationTypes.Size | FieldInvalidationTypes.Render);
}
internal int Height
{
get => _height;
set => UpdateProperty(ref _height, value, FieldInvalidationTypes.Size | FieldInvalidationTypes.Render);
}
internal bool IsActive
{
get => _isActive;
set => UpdateProperty(ref _isActive, value, FieldInvalidationTypes.Render);
}
internal Color ActiveGlowColor
{
get => _activeGlowColor;
set => UpdateProperty(ref _activeGlowColor, value, FieldInvalidationTypes.ActiveColor | FieldInvalidationTypes.Render);
}
internal Color InactiveGlowColor
{
get => _inactiveGlowColor;
set => UpdateProperty(ref _inactiveGlowColor, value, FieldInvalidationTypes.InactiveColor | FieldInvalidationTypes.Render);
}
private IntPtr TargetWindowHandle => new WindowInteropHelper(_targetWindow).Handle;
protected override bool IsWindowSubclassed => true;
private bool IsPositionValid => (_invalidatedValues & (FieldInvalidationTypes.Location | FieldInvalidationTypes.Size | FieldInvalidationTypes.Visibility)) == FieldInvalidationTypes.None;
private void UpdateProperty<T>(ref T field, T value, FieldInvalidationTypes invalidatedValues) where T : struct
{
if (!field.Equals(value))
{
field = value;
_invalidatedValues |= invalidatedValues;
if (!IsDeferringChanges) CommitChanges();
}
}
protected override ushort CreateWindowClassCore() => SharedWindowClassAtom;
protected override void DestroyWindowClassCore()
{
}
protected override IntPtr CreateWindowCore()
{
return InteropMethods.CreateWindowEx(
524416,
new IntPtr(WindowClassAtom),
string.Empty,
-2046820352,
0,
0,
0,
0,
new WindowInteropHelper(_targetWindow).Owner,
IntPtr.Zero,
IntPtr.Zero,
IntPtr.Zero);
}
internal void ChangeOwner(IntPtr newOwner) => InteropMethods.SetWindowLongPtr(Handle, InteropValues.GWLP.HWNDPARENT, newOwner);
protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam)
{
if (msg <= 70)
{
if (msg == 6) return IntPtr.Zero;
if (msg == 70)
{
var windowpos = (InteropValues.WINDOWPOS)Marshal.PtrToStructure(lParam, typeof(InteropValues.WINDOWPOS));
windowpos.flags |= 16u;
Marshal.StructureToPtr(windowpos, lParam, true);
}
}
else
{
if (msg != 126)
{
if (msg == 132) return new IntPtr(WmNcHitTest(lParam));
switch (msg)
{
case 161:
case 163:
case 164:
case 166:
case 167:
case 169:
case 171:
case 173:
{
var targetWindowHandle = TargetWindowHandle;
InteropMethods.SendMessage(targetWindowHandle, 6, new IntPtr(2), IntPtr.Zero);
InteropMethods.SendMessage(targetWindowHandle, msg, wParam, IntPtr.Zero);
return IntPtr.Zero;
}
}
}
else
{
if (IsVisible) RenderLayeredWindow();
}
}
return base.WndProc(hwnd, msg, wParam, lParam);
}
private int WmNcHitTest(IntPtr lParam)
{
var xLParam = InteropMethods.GetXLParam(lParam.ToInt32());
var yLParam = InteropMethods.GetYLParam(lParam.ToInt32());
InteropMethods.GetWindowRect(Handle, out var rect);
switch (_orientation)
{
case Dock.Left:
if (yLParam - CornerGripThickness < rect.Top) return 13;
if (yLParam + CornerGripThickness > rect.Bottom) return 16;
return 10;
case Dock.Top:
if (xLParam - CornerGripThickness < rect.Left) return 13;
if (xLParam + CornerGripThickness > rect.Right) return 14;
return 12;
case Dock.Right:
if (yLParam - CornerGripThickness < rect.Top) return 14;
if (yLParam + CornerGripThickness > rect.Bottom) return 17;
return 11;
default:
if (xLParam - CornerGripThickness < rect.Left) return 16;
if (xLParam + CornerGripThickness > rect.Right) return 17;
return 15;
}
}
internal void CommitChanges()
{
InvalidateCachedBitmaps();
UpdateWindowPosCore();
UpdateLayeredWindowCore();
_invalidatedValues = FieldInvalidationTypes.None;
}
private void InvalidateCachedBitmaps()
{
if (_invalidatedValues.HasFlag(FieldInvalidationTypes.ActiveColor)) ClearCache(_activeGlowBitmaps);
if (_invalidatedValues.HasFlag(FieldInvalidationTypes.InactiveColor)) ClearCache(_inactiveGlowBitmaps);
}
private void UpdateWindowPosCore()
{
if (_invalidatedValues.HasFlag(FieldInvalidationTypes.Location) ||
_invalidatedValues.HasFlag(FieldInvalidationTypes.Size) ||
_invalidatedValues.HasFlag(FieldInvalidationTypes.Visibility))
{
var num = 532;
if (_invalidatedValues.HasFlag(FieldInvalidationTypes.Visibility))
{
if (IsVisible)
num |= 64;
else
num |= 131;
}
if (!_invalidatedValues.HasFlag(FieldInvalidationTypes.Location)) num |= 2;
if (!_invalidatedValues.HasFlag(FieldInvalidationTypes.Size)) num |= 1;
InteropMethods.SetWindowPos(Handle, IntPtr.Zero, Left, Top, Width, Height, num);
}
}
private void UpdateLayeredWindowCore()
{
if (IsVisible && _invalidatedValues.HasFlag(FieldInvalidationTypes.Render))
{
if (IsPositionValid)
{
BeginDelayedRender();
return;
}
CancelDelayedRender();
RenderLayeredWindow();
}
}
private void BeginDelayedRender()
{
if (!_pendingDelayRender)
{
_pendingDelayRender = true;
CompositionTarget.Rendering += CommitDelayedRender;
}
}
private void CancelDelayedRender()
{
if (_pendingDelayRender)
{
_pendingDelayRender = false;
CompositionTarget.Rendering -= CommitDelayedRender;
}
}
private void CommitDelayedRender(object sender, EventArgs e)
{
CancelDelayedRender();
if (IsVisible) RenderLayeredWindow();
}
private void RenderLayeredWindow()
{
using var glowDrawingContext = new GlowDrawingContext(Width, Height);
if (glowDrawingContext.IsInitialized)
{
switch (_orientation)
{
case Dock.Left:
DrawLeft(glowDrawingContext);
break;
case Dock.Top:
DrawTop(glowDrawingContext);
break;
case Dock.Right:
DrawRight(glowDrawingContext);
break;
default:
DrawBottom(glowDrawingContext);
break;
}
var point = new InteropValues.POINT
{
X = Left,
Y = Top
};
var size = new InteropValues.SIZE
{
cx = Width,
cy = Height
};
var point2 = new InteropValues.POINT
{
X = 0,
Y = 0
};
InteropMethods.UpdateLayeredWindow(
Handle,
glowDrawingContext.ScreenDC,
ref point,
ref size,
glowDrawingContext.WindowDC,
ref point2,
0u,
ref glowDrawingContext.Blend,
2u);
}
}
private GlowBitmap GetOrCreateBitmap(GlowDrawingContext drawingContext, GlowBitmapPart bitmapPart)
{
GlowBitmap[] array;
Color color;
if (IsActive)
{
array = _activeGlowBitmaps;
color = ActiveGlowColor;
}
else
{
array = _inactiveGlowBitmaps;
color = InactiveGlowColor;
}
return array[(int) bitmapPart] ?? (array[(int) bitmapPart] = GlowBitmap.Create(drawingContext, bitmapPart, color));
}
private void ClearCache(GlowBitmap[] cache)
{
for (var i = 0; i < cache.Length; i++)
using (cache[i])
{
cache[i] = null;
}
}
protected override void DisposeManagedResources()
{
ClearCache(_activeGlowBitmaps);
ClearCache(_inactiveGlowBitmaps);
}
protected override void DisposeNativeResources()
{
base.DisposeNativeResources();
DisposedGlowEdges += 1L;
}
private void DrawLeft(GlowDrawingContext drawingContext)
{
var orCreateBitmap = GetOrCreateBitmap(drawingContext, GlowBitmapPart.CornerTopLeft);
var orCreateBitmap2 = GetOrCreateBitmap(drawingContext, GlowBitmapPart.LeftTop);
var orCreateBitmap3 = GetOrCreateBitmap(drawingContext, GlowBitmapPart.Left);
var orCreateBitmap4 = GetOrCreateBitmap(drawingContext, GlowBitmapPart.LeftBottom);
var orCreateBitmap5 = GetOrCreateBitmap(drawingContext, GlowBitmapPart.CornerBottomLeft);
var height = orCreateBitmap.Height;
var num = height + orCreateBitmap2.Height;
var num2 = drawingContext.Height - orCreateBitmap5.Height;
var num3 = num2 - orCreateBitmap4.Height;
var num4 = num3 - num;
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, 0, 0, orCreateBitmap.Width, orCreateBitmap.Height,
drawingContext.BackgroundDC, 0, 0, orCreateBitmap.Width, orCreateBitmap.Height,
drawingContext.Blend);
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap2.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, 0, height, orCreateBitmap2.Width,
orCreateBitmap2.Height, drawingContext.BackgroundDC, 0, 0, orCreateBitmap2.Width,
orCreateBitmap2.Height, drawingContext.Blend);
if (num4 > 0)
{
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap3.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, 0, num, orCreateBitmap3.Width, num4,
drawingContext.BackgroundDC, 0, 0, orCreateBitmap3.Width, orCreateBitmap3.Height,
drawingContext.Blend);
}
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap4.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, 0, num3, orCreateBitmap4.Width,
orCreateBitmap4.Height, drawingContext.BackgroundDC, 0, 0, orCreateBitmap4.Width,
orCreateBitmap4.Height, drawingContext.Blend);
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap5.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, 0, num2, orCreateBitmap5.Width,
orCreateBitmap5.Height, drawingContext.BackgroundDC, 0, 0, orCreateBitmap5.Width,
orCreateBitmap5.Height, drawingContext.Blend);
}
private void DrawRight(GlowDrawingContext drawingContext)
{
var orCreateBitmap = GetOrCreateBitmap(drawingContext, GlowBitmapPart.CornerTopRight);
var orCreateBitmap2 = GetOrCreateBitmap(drawingContext, GlowBitmapPart.RightTop);
var orCreateBitmap3 = GetOrCreateBitmap(drawingContext, GlowBitmapPart.Right);
var orCreateBitmap4 = GetOrCreateBitmap(drawingContext, GlowBitmapPart.RightBottom);
var orCreateBitmap5 = GetOrCreateBitmap(drawingContext, GlowBitmapPart.CornerBottomRight);
var height = orCreateBitmap.Height;
var num = height + orCreateBitmap2.Height;
var num2 = drawingContext.Height - orCreateBitmap5.Height;
var num3 = num2 - orCreateBitmap4.Height;
var num4 = num3 - num;
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, 0, 0, orCreateBitmap.Width, orCreateBitmap.Height,
drawingContext.BackgroundDC, 0, 0, orCreateBitmap.Width, orCreateBitmap.Height,
drawingContext.Blend);
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap2.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, 0, height, orCreateBitmap2.Width,
orCreateBitmap2.Height, drawingContext.BackgroundDC, 0, 0, orCreateBitmap2.Width,
orCreateBitmap2.Height, drawingContext.Blend);
if (num4 > 0)
{
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap3.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, 0, num, orCreateBitmap3.Width, num4,
drawingContext.BackgroundDC, 0, 0, orCreateBitmap3.Width, orCreateBitmap3.Height,
drawingContext.Blend);
}
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap4.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, 0, num3, orCreateBitmap4.Width,
orCreateBitmap4.Height, drawingContext.BackgroundDC, 0, 0, orCreateBitmap4.Width,
orCreateBitmap4.Height, drawingContext.Blend);
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap5.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, 0, num2, orCreateBitmap5.Width,
orCreateBitmap5.Height, drawingContext.BackgroundDC, 0, 0, orCreateBitmap5.Width,
orCreateBitmap5.Height, drawingContext.Blend);
}
private void DrawTop(GlowDrawingContext drawingContext)
{
var orCreateBitmap = GetOrCreateBitmap(drawingContext, GlowBitmapPart.TopLeft);
var orCreateBitmap2 = GetOrCreateBitmap(drawingContext, GlowBitmapPart.Top);
var orCreateBitmap3 = GetOrCreateBitmap(drawingContext, GlowBitmapPart.TopRight);
var num2 = GlowDepth + orCreateBitmap.Width;
var num3 = drawingContext.Width - GlowDepth - orCreateBitmap3.Width;
var num4 = num3 - num2;
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, GlowDepth, 0, orCreateBitmap.Width, orCreateBitmap.Height,
drawingContext.BackgroundDC, 0, 0, orCreateBitmap.Width, orCreateBitmap.Height,
drawingContext.Blend);
if (num4 > 0)
{
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap2.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, num2, 0, num4, orCreateBitmap2.Height,
drawingContext.BackgroundDC, 0, 0, orCreateBitmap2.Width, orCreateBitmap2.Height,
drawingContext.Blend);
}
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap3.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, num3, 0, orCreateBitmap3.Width,
orCreateBitmap3.Height, drawingContext.BackgroundDC, 0, 0, orCreateBitmap3.Width,
orCreateBitmap3.Height, drawingContext.Blend);
}
private void DrawBottom(GlowDrawingContext drawingContext)
{
var orCreateBitmap = GetOrCreateBitmap(drawingContext, GlowBitmapPart.BottomLeft);
var orCreateBitmap2 = GetOrCreateBitmap(drawingContext, GlowBitmapPart.Bottom);
var orCreateBitmap3 = GetOrCreateBitmap(drawingContext, GlowBitmapPart.BottomRight);
var num2 = GlowDepth + orCreateBitmap.Width;
var num3 = drawingContext.Width - GlowDepth - orCreateBitmap3.Width;
var num4 = num3 - num2;
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, GlowDepth, 0, orCreateBitmap.Width, orCreateBitmap.Height,
drawingContext.BackgroundDC, 0, 0, orCreateBitmap.Width, orCreateBitmap.Height,
drawingContext.Blend);
if (num4 > 0)
{
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap2.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, num2, 0, num4, orCreateBitmap2.Height,
drawingContext.BackgroundDC, 0, 0, orCreateBitmap2.Width, orCreateBitmap2.Height,
drawingContext.Blend);
}
InteropMethods.SelectObject(drawingContext.BackgroundDC, orCreateBitmap3.Handle);
InteropMethods.AlphaBlend(drawingContext.WindowDC, num3, 0, orCreateBitmap3.Width,
orCreateBitmap3.Height, drawingContext.BackgroundDC, 0, 0, orCreateBitmap3.Width,
orCreateBitmap3.Height, drawingContext.Blend);
}
internal void UpdateWindowPos()
{
var targetWindowHandle = TargetWindowHandle;
InteropMethods.GetWindowRect(targetWindowHandle, out var rect);
InteropMethods.GetWindowPlacement(targetWindowHandle);
if (IsVisible)
switch (_orientation)
{
case Dock.Left:
Left = rect.Left - GlowDepth;
Top = rect.Top - GlowDepth;
Width = GlowDepth;
Height = rect.Height + CornerGripThickness;
return;
case Dock.Top:
Left = rect.Left - GlowDepth;
Top = rect.Top - GlowDepth;
Width = rect.Width + CornerGripThickness;
Height = GlowDepth;
return;
case Dock.Right:
Left = rect.Right;
Top = rect.Top - GlowDepth;
Width = GlowDepth;
Height = rect.Height + CornerGripThickness;
return;
default:
Left = rect.Left - GlowDepth;
Top = rect.Bottom;
Width = rect.Width + CornerGripThickness;
Height = GlowDepth;
break;
}
}
[Flags]
private enum FieldInvalidationTypes
{
None = 0,
Location = 1,
Size = 2,
ActiveColor = 4,
InactiveColor = 8,
Render = 16,
Visibility = 32
}
}
}
@@ -5,5 +5,7 @@
public SystemVersionInfo SystemVersionInfo { get; set; }
public string Lang { get; set; }
public int TimelineFrameRate { get; set; } = 60;
}
}
@@ -0,0 +1,102 @@
using System;
using System.Runtime.InteropServices;
using HandyControl.Tools.Interop;
namespace HandyControl.Data
{
public abstract class HwndWrapper : DisposableObject
{
private IntPtr _handle;
private bool _isHandleCreationAllowed = true;
private ushort _wndClassAtom;
private Delegate _wndProc;
protected ushort WindowClassAtom
{
get
{
if (_wndClassAtom == 0) _wndClassAtom = CreateWindowClassCore();
return _wndClassAtom;
}
}
public IntPtr Handle
{
get
{
EnsureHandle();
return _handle;
}
}
protected virtual bool IsWindowSubclassed => false;
protected virtual ushort CreateWindowClassCore() => RegisterClass(Guid.NewGuid().ToString());
protected virtual void DestroyWindowClassCore()
{
if (_wndClassAtom != 0)
{
var moduleHandle = InteropMethods.GetModuleHandle(null);
InteropMethods.UnregisterClass(new IntPtr(_wndClassAtom), moduleHandle);
_wndClassAtom = 0;
}
}
protected ushort RegisterClass(string className)
{
var wndClass = default(InteropValues.WNDCLASS);
wndClass.cbClsExtra = 0;
wndClass.cbWndExtra = 0;
wndClass.hbrBackground = IntPtr.Zero;
wndClass.hCursor = IntPtr.Zero;
wndClass.hIcon = IntPtr.Zero;
wndClass.lpfnWndProc = _wndProc = new InteropValues.WndProc(WndProc);
wndClass.lpszClassName = className;
wndClass.lpszMenuName = null;
wndClass.style = 0u;
return InteropMethods.RegisterClass(ref wndClass);
}
private void SubclassWndProc()
{
_wndProc = new InteropValues.WndProc(WndProc);
InteropMethods.SetWindowLong(_handle, -4, Marshal.GetFunctionPointerForDelegate(_wndProc));
}
protected abstract IntPtr CreateWindowCore();
protected virtual void DestroyWindowCore()
{
if (_handle != IntPtr.Zero)
{
InteropMethods.DestroyWindow(_handle);
_handle = IntPtr.Zero;
}
}
protected virtual IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) =>
InteropMethods.DefWindowProc(hwnd, msg, wParam, lParam);
public void EnsureHandle()
{
if (_handle == IntPtr.Zero)
{
if (!_isHandleCreationAllowed) return;
_isHandleCreationAllowed = false;
_handle = CreateWindowCore();
if (IsWindowSubclassed) SubclassWndProc();
}
}
protected override void DisposeNativeResources()
{
_isHandleCreationAllowed = false;
DestroyWindowCore();
DestroyWindowClassCore();
}
}
}
@@ -302,6 +302,10 @@
internal const string WindowWin10 = nameof(WindowWin10);
internal const string WindowBlur = nameof(WindowBlur);
internal const string WindowGlow = nameof(WindowGlow);
internal const string AddTagButtonStyle = nameof(AddTagButtonStyle);
internal const string RadioGroupItemDefault = nameof(RadioGroupItemDefault);
@@ -41,6 +41,8 @@
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeThumb.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\TwoWayRangeBase.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Block\RunningBlock.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Controls\Window\GlowWindow.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\DisposableObject.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\DrawerShowMode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\HatchStyle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\HitMode.cs" />
@@ -48,6 +50,12 @@
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\NotifyIconInfoType.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\StrokePosition.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\TransitionMode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\GlowWindow\ChangeScope.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\GlowWindow\GlowBitmap.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\GlowWindow\GlowBitmapPart.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\GlowWindow\GlowDrawingContext.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\GlowWindow\GlowEdge.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Data\HwndWrapper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\Commands\CloseWindowCommand.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\Commands\OpenLinkCommand.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Media\Animation\DiscreteGeometryKeyFrame.cs" />
@@ -70,6 +78,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\Number2PercentageConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\RectangleCircularConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\ThicknessSplitConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\DependencyObjectExtension.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\FrameworkElementExtension.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\StringExtension.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\ValueExtension.cs" />
@@ -299,6 +308,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\ExternDllHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\IconHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\ResourceHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\ScreenHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\SecurityHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\SingleOpenHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\TokenizerHelper.cs" />
@@ -309,20 +319,14 @@
<Compile Include="$(MSBuildThisFileDirectory)Tools\Hook\KeyboardHook.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Hook\MouseHook.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Hook\SystemMenuHook.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\BitmapHandle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\BITMAPINFO.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\CommonHandles.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\ExternDll.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\HandleCollector.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\IconHandle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\ICONINFO.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\NativeMethods.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\NativeValues.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\NOTIFYICONDATA.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\SafeFileMappingHandle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\UnsafeNativeMethods.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\WNDCLASS.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\WpfSafeHandle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\BitmapHandle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\CommonHandles.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\HandleCollector.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\IconHandle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\InteropMethods.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\InteropValues.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\SafeFileMappingHandle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\WpfSafeHandle.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\MouseDragElementBehaviorEx.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Pool\IPool!1.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Tools\Pool\SimplePool!1.cs" />
@@ -394,6 +398,26 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\FlowDocumentScrollViewer.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\StatusBar.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Separator.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Base\SeparatorBaseStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Base\StatusBarBaseStyle.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\PinBox.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -923,4 +947,7 @@
<None Include="$(MSBuildThisFileDirectory)Resources\Effects\ColorComplementEffect.fx" />
<None Include="$(MSBuildThisFileDirectory)Resources\Effects\GrayScaleEffect.fx" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\" />
</ItemGroup>
</Project>
@@ -18,7 +18,7 @@ namespace HandyControl.Interactivity
var hwndSource = (HwndSource)PresentationSource.FromDependencyObject(Application.Current.MainWindow);
if (hwndSource != null)
{
UnsafeNativeMethods.SetForegroundWindow(hwndSource.Handle);
InteropMethods.SetForegroundWindow(hwndSource.Handle);
}
}
}
@@ -320,5 +320,23 @@ namespace HandyControl.Properties.Langs {
return ResourceManager.GetString("Yes", resourceCulture);
}
}
/// <summary>
/// 查找类似 放大 的本地化字符串。
/// </summary>
public static string ZoomIn {
get {
return ResourceManager.GetString("ZoomIn", resourceCulture);
}
}
/// <summary>
/// 查找类似 缩小 的本地化字符串。
/// </summary>
public static string ZoomOut {
get {
return ResourceManager.GetString("ZoomOut", resourceCulture);
}
}
}
}
@@ -184,4 +184,10 @@
<data name="No" xml:space="preserve">
<value>No</value>
</data>
<data name="ZoomIn" xml:space="preserve">
<value>Zoom in</value>
</data>
<data name="ZoomOut" xml:space="preserve">
<value>Zoom out</value>
</data>
</root>
@@ -184,4 +184,10 @@
<data name="No" xml:space="preserve">
<value>خیر</value>
</data>
<data name="ZoomIn" xml:space="preserve">
<value>Zoom in</value>
</data>
<data name="ZoomOut" xml:space="preserve">
<value>Zoom out</value>
</data>
</root>
@@ -204,4 +204,10 @@
<data name="No" xml:space="preserve">
<value>Non</value>
</data>
<data name="ZoomIn" xml:space="preserve">
<value>Zoom in</value>
</data>
<data name="ZoomOut" xml:space="preserve">
<value>Zoom out</value>
</data>
</root>
@@ -204,4 +204,10 @@
<data name="Yes" xml:space="preserve">
<value>네</value>
</data>
<data name="ZoomIn" xml:space="preserve">
<value>Zoom in</value>
</data>
<data name="ZoomOut" xml:space="preserve">
<value>Zoom out</value>
</data>
</root>
Loaded 100 of 162 files, more files were not shown because too many files have changed in this diff. Show more