No files matched your search
@@ -35,6 +35,8 @@
|
|||||||
<a href="https://github.com/noctwolf" target="_blank"><img width="64px" src="https://avatars3.githubusercontent.com/u/21022467?s=400&v=4"></a>
|
<a href="https://github.com/noctwolf" target="_blank"><img width="64px" src="https://avatars3.githubusercontent.com/u/21022467?s=400&v=4"></a>
|
||||||
<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/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/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
|
## Backers
|
||||||
|
|
||||||
@@ -48,6 +50,9 @@
|
|||||||
<a href="https://github.com/AFei19911012" target="_blank"><img width="64px" src="https://avatars0.githubusercontent.com/u/31465314?s=400&v=4"></a>
|
<a href="https://github.com/AFei19911012" target="_blank"><img width="64px" src="https://avatars0.githubusercontent.com/u/31465314?s=400&v=4"></a>
|
||||||
<a href="https://github.com/wayne2006" target="_blank"><img width="64px" src="https://avatars0.githubusercontent.com/u/21210915?s=400&v=4"></a>
|
<a href="https://github.com/wayne2006" target="_blank"><img width="64px" src="https://avatars0.githubusercontent.com/u/21210915?s=400&v=4"></a>
|
||||||
<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/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
|
## Special thanks to
|
||||||
|
|
||||||
@@ -93,6 +98,18 @@ Step 4:enjoy coding
|
|||||||
|
|
||||||
## Latest examples
|
## Latest examples
|
||||||
|
|
||||||
|
### GlowWindow
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### FlowDocumentScrollViewerStyle
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### PinBox
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### Effects
|
### Effects
|
||||||
|
|
||||||

|

|
||||||
@@ -101,6 +118,8 @@ Step 4:enjoy coding
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## History publication
|
||||||
|
|
||||||
### Drawer
|
### Drawer
|
||||||
|
|
||||||

|

|
||||||
@@ -113,8 +132,6 @@ Step 4:enjoy coding
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
## History publication
|
|
||||||
|
|
||||||
### GeometryAnimation
|
### GeometryAnimation
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -1,5 +1,66 @@
|
|||||||
---
|
---
|
||||||
title: 建设中
|
title: CalendarWithClock
|
||||||
---
|
---
|
||||||
|
|
||||||
建设中
|
|
||||||
|
CalendarWithClock 控件由日历和时钟组成,允许用户通过鼠标选择日期和时间。
|
||||||
|
|
||||||
|
``` CS
|
||||||
|
[TemplatePart(Name = ElementButtonConfirm, Type = typeof(Button))]
|
||||||
|
[TemplatePart(Name = ElementClockPresenter, Type = typeof(ContentPresenter))]
|
||||||
|
[TemplatePart(Name = ElementCalendarPresenter, Type = typeof(ContentPresenter))]
|
||||||
|
public class CalendarWithClock : Control
|
||||||
|
```
|
||||||
|
|
||||||
|
# 创建日期选取器
|
||||||
|
|
||||||
|
``` XML
|
||||||
|
<hc:CalendarWithClock />
|
||||||
|
```
|
||||||
|
|
||||||
|
``` CS
|
||||||
|
var dateTimePicker = new CalendarWithClock();
|
||||||
|
```
|
||||||
|
|
||||||
|
生成的CalendarWithClock如下图所示:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 选择日期和时间
|
||||||
|
|
||||||
|
通过鼠标分别在日历和时钟上选择日期和时间,然后点击 **确定** 按钮即可更新CalendarWithClock控件的日期和时间。
|
||||||
|
|
||||||
|
|
||||||
|
也可以在XAML钟或代码中这样设置日期。
|
||||||
|
|
||||||
|
``` XML
|
||||||
|
<hc:CalendarWithClock SelectedDateTime="{x:Static system:DateTime.Now}"/>
|
||||||
|
```
|
||||||
|
|
||||||
|
``` CS
|
||||||
|
calendarWithClock.SelectedDateTime = DateTime.Now;
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 属性
|
||||||
|
|
||||||
|
| 属性 | 描述 |
|
||||||
|
| ---------------- | ------------------ |
|
||||||
|
| SelectedDateTime | 获取或设置当前选中的日期和时间 |
|
||||||
|
| DateTimeFormat | 获取或设置用于显示选定日期和时间的格式 |
|
||||||
|
| DisplayDateTime | 获取或设置要显示的日期 |
|
||||||
|
| ShowConfirmButton | 获取或设置一个值,该值指示是是否显示 **确定** 按钮 |
|
||||||
|
| VerifyFunc | 获取或设置数据验证委托 |
|
||||||
|
| IsError | 获取或设置数据是否错误 |
|
||||||
|
| ErrorStr | 获取或设置错误提示 |
|
||||||
|
| TextType | 获取或设置文本类型 |
|
||||||
|
| ShowClearButton | 获取或设置是否显示清除按钮 |
|
||||||
|
|
||||||
|
# 方法
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| ---------------- | ------------------ |
|
||||||
|
| VerifyData() | 验证数据 |
|
||||||
@@ -1,5 +1,74 @@
|
|||||||
---
|
---
|
||||||
title: 建设中
|
title: DatePicker
|
||||||
---
|
---
|
||||||
|
|
||||||
建设中
|
DatePicker 控件允许用户通过在文本框中键入日期或使用下拉的日历控件来选择日期。
|
||||||
|
|
||||||
|
``` CS
|
||||||
|
[TemplatePart(Name = ElementTextBox, Type = typeof(DatePickerTextBox))]
|
||||||
|
public class DatePicker : System.Windows.Controls.DatePicker, IDataInput
|
||||||
|
```
|
||||||
|
|
||||||
|
# 创建DatePicker
|
||||||
|
|
||||||
|
``` XML
|
||||||
|
<hc:DatePicker />
|
||||||
|
```
|
||||||
|
|
||||||
|
``` CS
|
||||||
|
var datePicker = new DatePicker();
|
||||||
|
```
|
||||||
|
|
||||||
|
生成的DatePicker如下图所示:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 选择日期
|
||||||
|
|
||||||
|
可以通过文本框输入日期,或者点击文本框右边的按钮打开下拉的日历控件选择日期。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
也可以在XAML钟或代码中这样设置日期。
|
||||||
|
|
||||||
|
``` XML
|
||||||
|
<hc:DatePicker SelectedDate="{x:Static system:DateTime.Now}"/>
|
||||||
|
```
|
||||||
|
|
||||||
|
``` CS
|
||||||
|
datePicker.SelectedDate = DateTime.Now;
|
||||||
|
```
|
||||||
|
|
||||||
|
# 设置标题和占位符文本
|
||||||
|
|
||||||
|
你可以将 Header(标题)和 Placeholder(占位符)添加到DatePicker,以向用户指示其用途。
|
||||||
|
|
||||||
|
``` XML
|
||||||
|
<hc:DatePicker hc:InfoElement.TitleWidth="140"
|
||||||
|
hc:InfoElement.TitleAlignment="Left"
|
||||||
|
hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}"
|
||||||
|
hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr3}" />
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 属性
|
||||||
|
|
||||||
|
| 属性 | 描述 |
|
||||||
|
| ---------------- | ------------------ |
|
||||||
|
| SelectedDate | 获取或设置当前选中的日期 |
|
||||||
|
| VerifyFunc | 获取或设置数据验证委托 |
|
||||||
|
| IsError | 获取或设置数据是否错误 |
|
||||||
|
| ErrorStr | 获取或设置错误提示 |
|
||||||
|
| TextType | 获取或设置文本类型 |
|
||||||
|
| ShowClearButton | 获取或设置是否显示清除按钮 |
|
||||||
|
|
||||||
|
# 方法
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| ---------------- | ------------------ |
|
||||||
|
| VerifyData() | 验证数据 |
|
||||||
|
|
||||||
@@ -1,5 +1,82 @@
|
|||||||
---
|
---
|
||||||
title: 建设中
|
title: DateTimePicker
|
||||||
---
|
---
|
||||||
|
|
||||||
建设中
|
|
||||||
|
DatePicker 控件允许用户通过在文本框中键入日期和时间,或使用下拉的日历控件来选择日期和时间。
|
||||||
|
|
||||||
|
``` CS
|
||||||
|
[TemplatePart(Name = ElementRoot, Type = typeof(Grid))]
|
||||||
|
[TemplatePart(Name = ElementTextBox, Type = typeof(WatermarkTextBox))]
|
||||||
|
[TemplatePart(Name = ElementButton, Type = typeof(Button))]
|
||||||
|
[TemplatePart(Name = ElementPopup, Type = typeof(Popup))]
|
||||||
|
public class DateTimePicker : Control, IDataInput
|
||||||
|
```
|
||||||
|
|
||||||
|
# 创建DateTimePicker
|
||||||
|
|
||||||
|
``` XML
|
||||||
|
<hc:DateTimePicker />
|
||||||
|
```
|
||||||
|
|
||||||
|
``` CS
|
||||||
|
var dateTimePicker = new DateTimePicker();
|
||||||
|
```
|
||||||
|
|
||||||
|
生成的DateTimePicker如下图所示:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 选择日期和时间
|
||||||
|
|
||||||
|
可以通过文本框输入日期和时间,或者点击文本框右边的按钮打开下拉的日历和时钟控件选择日期和时间。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
也可以在XAML中或代码中这样设置日期。
|
||||||
|
|
||||||
|
``` XML
|
||||||
|
<hc:DateTimePicker SelectedDateTime="{x:Static system:DateTime.Now}"/>
|
||||||
|
```
|
||||||
|
|
||||||
|
``` CS
|
||||||
|
dateTimePicker.SelectedDateTime = DateTime.Now;
|
||||||
|
```
|
||||||
|
|
||||||
|
# 设置标题和占位符文本
|
||||||
|
|
||||||
|
你可以将 Header(标题)和 Placeholder(占位符)添加到DatePicker,以向用户指示其用途。要使用这两个属性,首先需要应用 **DateTimePickerExtend** 或 **DateTimePickerPlus** 样式。
|
||||||
|
|
||||||
|
``` XML
|
||||||
|
<hc:DateTimePicker ShowClearButton="True"
|
||||||
|
Style="{StaticResource DateTimePickerExtend}"
|
||||||
|
hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}"
|
||||||
|
hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}"/>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 属性
|
||||||
|
|
||||||
|
| 属性 | 描述 |
|
||||||
|
| ---------------- | ------------------ |
|
||||||
|
| SelectedDateTime | 获取或设置当前选中的日期和时间 |
|
||||||
|
| DateTimeFormat | 获取或设置用于显示选定日期和时间的格式 |
|
||||||
|
| CalendarStyle | 获取或设置在呈现日历时使用的样式 |
|
||||||
|
| DisplayDateTime | 获取或设置要显示的日期 |
|
||||||
|
| IsDropDownOpen | 获取或设置一个值,该值指示是打开还是关闭下拉 Calendar |
|
||||||
|
| Text | 获取由 **DateTimePicker** 显示的文本,或设置选定日期和时间 |
|
||||||
|
| VerifyFunc | 获取或设置数据验证委托 |
|
||||||
|
| IsError | 获取或设置数据是否错误 |
|
||||||
|
| ErrorStr | 获取或设置错误提示 |
|
||||||
|
| TextType | 获取或设置文本类型 |
|
||||||
|
| ShowClearButton | 获取或设置是否显示清除按钮 |
|
||||||
|
|
||||||
|
# 方法
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| ---------------- | ------------------ |
|
||||||
|
| VerifyData() | 验证数据 |
|
||||||
@@ -1,5 +1,95 @@
|
|||||||
---
|
---
|
||||||
title: 建设中
|
title: TimePicker
|
||||||
---
|
---
|
||||||
|
|
||||||
建设中
|
TimePicker 控件允许用户通过在文本框中键入时间或使用下拉的日历控件来选择时间。
|
||||||
|
|
||||||
|
``` CS
|
||||||
|
[TemplatePart(Name = ElementRoot, Type = typeof(Grid))]
|
||||||
|
[TemplatePart(Name = ElementTextBox, Type = typeof(WatermarkTextBox))]
|
||||||
|
[TemplatePart(Name = ElementButton, Type = typeof(Button))]
|
||||||
|
[TemplatePart(Name = ElementPopup, Type = typeof(Popup))]
|
||||||
|
public class TimePicker : Control, IDataInput
|
||||||
|
```
|
||||||
|
|
||||||
|
# 创建TimePicker
|
||||||
|
|
||||||
|
``` XML
|
||||||
|
<hc:TimePicker />
|
||||||
|
```
|
||||||
|
|
||||||
|
``` CS
|
||||||
|
var timePicker = new TimePicker();
|
||||||
|
```
|
||||||
|
|
||||||
|
生成的TimePicker如下图所示:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 选择时间
|
||||||
|
|
||||||
|
可以通过文本框输入时间,或者点击文本框右边的按钮打开下拉的时钟控件选择时间。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
也可以在XAML钟或代码中这样设置日期。
|
||||||
|
|
||||||
|
``` XML
|
||||||
|
<hc:TimePicker SelectedTime="{x:Static system:DateTime.Now}"/>
|
||||||
|
```
|
||||||
|
|
||||||
|
``` CS
|
||||||
|
timePicker.SelectedTime = DateTime.Now;
|
||||||
|
```
|
||||||
|
|
||||||
|
# 更改时钟样式
|
||||||
|
|
||||||
|
通过更改Clock属性,TimePicker可以更改时钟的样式。
|
||||||
|
|
||||||
|
``` XML
|
||||||
|
<hc:TimePicker ShowClearButton="True" Style="{StaticResource TimePickerPlus}">
|
||||||
|
<hc:TimePicker.Clock>
|
||||||
|
<hc:ListClock/>
|
||||||
|
</hc:TimePicker.Clock>
|
||||||
|
</hc:TimePicker>
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
# 设置标题和占位符文本
|
||||||
|
|
||||||
|
你可以将 Header(标题)和 Placeholder(占位符)添加到DatePicker,以向用户指示其用途。要使用这两个属性,首先需要应用 **TimePickerExtend** 或 **TimePickerPlus** 样式。
|
||||||
|
|
||||||
|
``` XML
|
||||||
|
<hc:TimePicker hc:InfoElement.Placeholder="{x:Static langs:Lang.PlsEnterContent}"
|
||||||
|
hc:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr2}"
|
||||||
|
Style="{StaticResource TimePickerExtend}"/>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 属性
|
||||||
|
|
||||||
|
| 属性 | 描述 |
|
||||||
|
| ---------------- | ------------------ |
|
||||||
|
| SelectedTime | 获取或设置当前选中的时间 |
|
||||||
|
| Clock | 获取或设置下拉时钟 |
|
||||||
|
| TimeFormat | 获取或设置用于显示选定的时间的格式 |
|
||||||
|
| DisplayTime | 获取或设置要显示的时间 |
|
||||||
|
| IsDropDownOpen | 获取或设置一个值,该值指示是打开还是关闭下拉时钟 |
|
||||||
|
| Text | 获取由 **TimePicker** 显示的文本,或设置选定的时间 |
|
||||||
|
| VerifyFunc | 获取或设置数据验证委托 |
|
||||||
|
| IsError | 获取或设置数据是否错误 |
|
||||||
|
| ErrorStr | 获取或设置错误提示 |
|
||||||
|
| TextType | 获取或设置文本类型 |
|
||||||
|
| ShowClearButton | 获取或设置是否显示清除按钮 |
|
||||||
|
|
||||||
|
# 方法
|
||||||
|
|
||||||
|
| 方法 | 描述 |
|
||||||
|
| ---------------- | ------------------ |
|
||||||
|
| VerifyData() | 验证数据 |
|
||||||
|
|
||||||
@@ -4,7 +4,7 @@ title: 鸣谢
|
|||||||
|
|
||||||
# 感谢以下Coder提供代码贡献
|
# 感谢以下Coder提供代码贡献
|
||||||
|
|
||||||
<p><a style="border:0" href="https://github.com/ghost1372" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars0.githubusercontent.com/u/9213496?s=400&v=4" alt="ghost1372"></a><a style="border:0" href="https://github.com/DingpingZhang" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars0.githubusercontent.com/u/8541016?s=400&v=4" alt="Dingping Zhang"></a><a style="border:0" href="https://github.com/M0n7y5" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars0.githubusercontent.com/u/17201053?s=400&v=4" alt="M0n7y5"></a><a style="border:0" href="https://github.com/guanguanchuangyu" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/25916858?s=400&v=4" alt="guanguanchuangyu"></a><a style="border:0" href="https://github.com/yanchao891012" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars0.githubusercontent.com/u/16846702?s=400&v=4" alt="yanchao891012"></a><a style="border:0" href="https://github.com/noctwolf" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars3.githubusercontent.com/u/21022467?s=400&v=4" alt="noctwolf"></a><a style="border:0" href="https://github.com/xianyun666" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/22339210?s=400&v=4" alt="xianyun666"></a><a style="border:0" href="https://github.com/afunc233" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/19919631?s=400&v=4" alt="afunc233"></a></p>
|
<p><a style="border:0" href="https://github.com/ghost1372" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars0.githubusercontent.com/u/9213496?s=400&v=4" alt="ghost1372"></a><a style="border:0" href="https://github.com/DingpingZhang" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars0.githubusercontent.com/u/8541016?s=400&v=4" alt="Dingping Zhang"></a><a style="border:0" href="https://github.com/M0n7y5" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars0.githubusercontent.com/u/17201053?s=400&v=4" alt="M0n7y5"></a><a style="border:0" href="https://github.com/guanguanchuangyu" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/25916858?s=400&v=4" alt="guanguanchuangyu"></a><a style="border:0" href="https://github.com/yanchao891012" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars0.githubusercontent.com/u/16846702?s=400&v=4" alt="yanchao891012"></a><a style="border:0" href="https://github.com/noctwolf" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars3.githubusercontent.com/u/21022467?s=400&v=4" alt="noctwolf"></a><a style="border:0" href="https://github.com/xianyun666" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/22339210?s=400&v=4" alt="xianyun666"></a><a style="border:0" href="https://github.com/afunc233" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/19919631?s=400&v=4" alt="afunc233"></a><a style="border:0" href="https://github.com/DinoChan" target="_blank" rel="noopener"><img width="120" height="120" src="https://avatars1.githubusercontent.com/u/6076257?s=400&v=4" alt="DinoChan"></a></p>
|
||||||
|
|
||||||
# 感谢以下组织机构提供开源许可
|
# 感谢以下组织机构提供开源许可
|
||||||
|
|
||||||
@@ -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></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>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<Version>2.4.0</Version>
|
<Version>2.4.0</Version>
|
||||||
<ApplicationIcon>..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico</ApplicationIcon>
|
<ApplicationIcon>..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico</ApplicationIcon>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<Copyright>Copyright © HandyOrg 2018-2019</Copyright>
|
<Copyright>Copyright © HandyOrg 2018-2020</Copyright>
|
||||||
<FileVersion>2.4.0.0</FileVersion>
|
<FileVersion>2.4.0.0</FileVersion>
|
||||||
<AssemblyVersion>2.4.0.0</AssemblyVersion>
|
<AssemblyVersion>2.4.0.0</AssemblyVersion>
|
||||||
<LangVersion>8.0</LangVersion>
|
<LangVersion>8.0</LangVersion>
|
||||||
@@ -454,6 +454,15 @@
|
|||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Effects_16x.png">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\Effects_16x.png">
|
||||||
<Link>Resources\Img\LeftMainContent\Effects_16x.png</Link>
|
<Link>Resources\Img\LeftMainContent\Effects_16x.png</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
<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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.en.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.en.resx">
|
||||||
@@ -465,6 +474,9 @@
|
|||||||
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.fr.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.fr.resx">
|
||||||
<Link>Properties\Langs\Lang.fr.resx</Link>
|
<Link>Properties\Langs\Lang.fr.resx</Link>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.ko-KR.resx">
|
||||||
|
<Link>Properties\Langs\Lang.ko-KR.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.resx">
|
||||||
<Link>Properties\Langs\Lang.resx</Link>
|
<Link>Properties\Langs\Lang.resx</Link>
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<AssemblyVersion>2.4.0.0</AssemblyVersion>
|
<AssemblyVersion>2.4.0.0</AssemblyVersion>
|
||||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||||
<Copyright>Copyright © HandyOrg 2018-2019</Copyright>
|
<Copyright>Copyright © HandyOrg 2018-2020</Copyright>
|
||||||
<Description>Contains some commonly used simple WPF controls</Description>
|
<Description>Contains some commonly used simple WPF controls</Description>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<LangVersion>8.0</LangVersion>
|
<LangVersion>8.0</LangVersion>
|
||||||
@@ -39,6 +39,9 @@
|
|||||||
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.fr.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.fr.resx">
|
||||||
<Link>Properties\Langs\Lang.fr.resx</Link>
|
<Link>Properties\Langs\Lang.fr.resx</Link>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.ko-KR.resx">
|
||||||
|
<Link>Properties\Langs\Lang.ko-KR.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.resx">
|
||||||
<Link>Properties\Langs\Lang.resx</Link>
|
<Link>Properties\Langs\Lang.resx</Link>
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
@@ -65,4 +68,54 @@
|
|||||||
<Link>Resources\Effects\GrayScaleEffect.ps</Link>
|
<Link>Resources\Effects\GrayScaleEffect.ps</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
</ItemGroup>
|
</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>
|
</Project>
|
||||||
@@ -48,18 +48,15 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="Window">
|
<Style TargetType="Window">
|
||||||
<Setter Property="UseLayoutRounding" Value="True"/>
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="WindowDefault" TargetType="Window">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="UseLayoutRounding" Value="True"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="WindowWin10" TargetType="controls:Window">
|
<Style x:Key="WindowWin10" TargetType="controls:Window">
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<Setter Property="BorderBrush" Value="#262e2f"/>
|
<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="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
<Setter Property="UseLayoutRounding" Value="True"/>
|
<Setter Property="UseLayoutRounding" Value="True"/>
|
||||||
<Setter Property="NonClientAreaBackground" Value="{DynamicResource RegionBrush}"/>
|
<Setter Property="NonClientAreaBackground" Value="{DynamicResource RegionBrush}"/>
|
||||||
@@ -181,6 +178,12 @@
|
|||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
</Style>
|
</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">
|
<Style TargetType="controls:ImageBrowser">
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<Setter Property="MinWidth" Value="400"/>
|
<Setter Property="MinWidth" Value="400"/>
|
||||||
|
|||||||
@@ -410,6 +410,9 @@
|
|||||||
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.fr.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.fr.resx">
|
||||||
<Link>Properties\Langs\Lang.fr.resx</Link>
|
<Link>Properties\Langs\Lang.fr.resx</Link>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.ko-KR.resx">
|
||||||
|
<Link>Properties\Langs\Lang.ko-KR.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.resx">
|
||||||
<Link>Properties\Langs\Lang.resx</Link>
|
<Link>Properties\Langs\Lang.resx</Link>
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
@@ -517,6 +520,15 @@
|
|||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\RepeatButton_16x.png">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\RepeatButton_16x.png">
|
||||||
<Link>Resources\Img\LeftMainContent\RepeatButton_16x.png</Link>
|
<Link>Resources\Img\LeftMainContent\RepeatButton_16x.png</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
<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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Data\DemoInfo.json">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Data\DemoInfo.json">
|
||||||
|
|||||||
@@ -98,6 +98,9 @@
|
|||||||
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.fr.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.fr.resx">
|
||||||
<Link>Properties\Langs\Lang.fr.resx</Link>
|
<Link>Properties\Langs\Lang.fr.resx</Link>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.ko-KR.resx">
|
||||||
|
<Link>Properties\Langs\Lang.ko-KR.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.resx">
|
||||||
<Link>Properties\Langs\Lang.resx</Link>
|
<Link>Properties\Langs\Lang.resx</Link>
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
@@ -117,6 +120,56 @@
|
|||||||
<Link>Resources\Effects\GrayScaleEffect.ps</Link>
|
<Link>Resources\Effects\GrayScaleEffect.ps</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
</ItemGroup>
|
</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="..\..\Shared\HandyControl_Shared\HandyControl_Shared.projitems" Label="Shared" />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -49,18 +49,15 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="Window">
|
<Style TargetType="Window">
|
||||||
<Setter Property="UseLayoutRounding" Value="True"/>
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="WindowDefault" BasedOn="{x:Null}" TargetType="Window">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="UseLayoutRounding" Value="True"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="WindowWin10" BasedOn="{x:Null}" TargetType="controls:Window">
|
<Style x:Key="WindowWin10" BasedOn="{x:Null}" TargetType="controls:Window">
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<Setter Property="BorderBrush" Value="#262e2f"/>
|
<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="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
<Setter Property="UseLayoutRounding" Value="True"/>
|
<Setter Property="UseLayoutRounding" Value="True"/>
|
||||||
<Setter Property="NonClientAreaBackground" Value="{DynamicResource RegionBrush}"/>
|
<Setter Property="NonClientAreaBackground" Value="{DynamicResource RegionBrush}"/>
|
||||||
@@ -182,6 +179,12 @@
|
|||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
</Style>
|
</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">
|
<Style TargetType="controls:ImageBrowser">
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<Setter Property="MinWidth" Value="400"/>
|
<Setter Property="MinWidth" Value="400"/>
|
||||||
|
|||||||
@@ -478,6 +478,9 @@
|
|||||||
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.fr.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.fr.resx">
|
||||||
<Link>Properties\Langs\Lang.fr.resx</Link>
|
<Link>Properties\Langs\Lang.fr.resx</Link>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.ko-KR.resx">
|
||||||
|
<Link>Properties\Langs\Lang.ko-KR.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.resx">
|
||||||
<Link>Properties\Langs\Lang.resx</Link>
|
<Link>Properties\Langs\Lang.resx</Link>
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
@@ -580,6 +583,15 @@
|
|||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\MainMenuControl_16x.png">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\MainMenuControl_16x.png">
|
||||||
<Link>Resources\Img\LeftMainContent\MainMenuControl_16x.png</Link>
|
<Link>Resources\Img\LeftMainContent\MainMenuControl_16x.png</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
<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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\fabric-icons.ttf">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\fabric-icons.ttf">
|
||||||
|
|||||||
@@ -168,6 +168,9 @@
|
|||||||
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.fr.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.fr.resx">
|
||||||
<Link>Properties\Langs\Lang.fr.resx</Link>
|
<Link>Properties\Langs\Lang.fr.resx</Link>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.ko-KR.resx">
|
||||||
|
<Link>Properties\Langs\Lang.ko-KR.resx</Link>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControl_Shared\Properties\Langs\Lang.resx">
|
||||||
<Link>Properties\Langs\Lang.resx</Link>
|
<Link>Properties\Langs\Lang.resx</Link>
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
@@ -188,6 +191,56 @@
|
|||||||
<Link>Resources\Effects\GrayScaleEffect.ps</Link>
|
<Link>Resources\Effects\GrayScaleEffect.ps</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
</ItemGroup>
|
</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="..\..\Shared\HandyControl_Shared\HandyControl_Shared.projitems" Label="Shared" />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -48,18 +48,15 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="Window">
|
<Style TargetType="Window">
|
||||||
<Setter Property="UseLayoutRounding" Value="True"/>
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style x:Key="WindowDefault" TargetType="Window">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
|
|
||||||
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="UseLayoutRounding" Value="True"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="WindowWin10" TargetType="controls:Window">
|
<Style x:Key="WindowWin10" TargetType="controls:Window">
|
||||||
<Setter Property="BorderThickness" Value="1"/>
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
<Setter Property="BorderBrush" Value="#262e2f"/>
|
<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="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
<Setter Property="UseLayoutRounding" Value="True"/>
|
<Setter Property="UseLayoutRounding" Value="True"/>
|
||||||
<Setter Property="NonClientAreaBackground" Value="{DynamicResource RegionBrush}"/>
|
<Setter Property="NonClientAreaBackground" Value="{DynamicResource RegionBrush}"/>
|
||||||
@@ -181,6 +178,12 @@
|
|||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
</Style>
|
</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">
|
<Style TargetType="controls:ImageBrowser">
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<Setter Property="MinWidth" Value="400"/>
|
<Setter Property="MinWidth" Value="400"/>
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ namespace HandyControlDemo
|
|||||||
UpdateSkin(GlobalData.Config.Skin);
|
UpdateSkin(GlobalData.Config.Skin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ConfigHelper.Instance.SetWindowDefaultStyle();
|
||||||
ConfigHelper.Instance.SetSystemVersionInfo(CommonHelper.GetSystemVersionInfo());
|
ConfigHelper.Instance.SetSystemVersionInfo(CommonHelper.GetSystemVersionInfo());
|
||||||
|
|
||||||
ServicePointManager.SecurityProtocol = (SecurityProtocolType)(SslProtocols)0x00000C00;
|
ServicePointManager.SecurityProtocol = (SecurityProtocolType)(SslProtocols)0x00000C00;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
[ "GroupBox", "GroupBoxDemoCtl", "GroupBox_16x", "" ],
|
[ "GroupBox", "GroupBoxDemoCtl", "GroupBox_16x", "" ],
|
||||||
[ "Menu", "MenuDemoCtl", "ContextMenu_16x", "" ],
|
[ "Menu", "MenuDemoCtl", "ContextMenu_16x", "" ],
|
||||||
[ "RichTextBox", "RichTextBoxDemoCtl", "RichTextBox_16x", "" ],
|
[ "RichTextBox", "RichTextBoxDemoCtl", "RichTextBox_16x", "" ],
|
||||||
|
[ "FlowDocumentScrollViewer", "FlowDocumentScrollViewerDemoCtl", "WPFFlowDocument_16x", "1" ],
|
||||||
[ "ToolBar", "ToolBarDemoCtl", "ToolBar_16x", "" ],
|
[ "ToolBar", "ToolBarDemoCtl", "ToolBar_16x", "" ],
|
||||||
[ "Border", "BorderDemoCtl", "BorderElement_16x", "" ],
|
[ "Border", "BorderDemoCtl", "BorderElement_16x", "" ],
|
||||||
[ "Label", "LabelDemoCtl", "Label_16x", "" ]
|
[ "Label", "LabelDemoCtl", "Label_16x", "" ]
|
||||||
@@ -44,12 +45,13 @@
|
|||||||
[ "ButtonGroup", "ButtonGroupDemoCtl", "ButtonGroup_16x", "" ],
|
[ "ButtonGroup", "ButtonGroupDemoCtl", "ButtonGroup_16x", "" ],
|
||||||
[ "ProgressButton", "ProgressButtonDemoCtl", "ProgressButton_16x", "" ],
|
[ "ProgressButton", "ProgressButtonDemoCtl", "ProgressButton_16x", "" ],
|
||||||
[ "ChatBubble", "ChatBubbleDemoCtl", "Bubble_16xLG", "" ],
|
[ "ChatBubble", "ChatBubbleDemoCtl", "Bubble_16xLG", "" ],
|
||||||
[ "Poptip", "PoptipDemoCtl", "PopupCursor_16x", "1" ],
|
[ "Poptip", "PoptipDemoCtl", "PopupCursor_16x", "" ],
|
||||||
[ "NotifyIcon", "NotifyIconDemoCtl", "NotificationHub_16x", "" ],
|
[ "NotifyIcon", "NotifyIconDemoCtl", "NotificationHub_16x", "" ],
|
||||||
[ "NumericUpDown", "NumericUpDownDemoCtl", "NumericListBox_16x", "" ],
|
[ "NumericUpDown", "NumericUpDownDemoCtl", "NumericListBox_16x", "" ],
|
||||||
[ "TextBox", "TextBoxDemoCtl", "TextBox_16x", "" ],
|
[ "TextBox", "TextBoxDemoCtl", "TextBox_16x", "" ],
|
||||||
[ "ComboBox", "ComboBoxDemoCtl", "ComboBox_16x", "" ],
|
[ "ComboBox", "ComboBoxDemoCtl", "ComboBox_16x", "" ],
|
||||||
[ "PasswordBox", "PasswordBoxDemoCtl", "PasswordBox_16x", "" ],
|
[ "PasswordBox", "PasswordBoxDemoCtl", "PasswordBox_16x", "" ],
|
||||||
|
[ "PinBox", "PinBoxDemoCtl", "Ellipsis_16x", "1" ],
|
||||||
[ "DatePicker", "DatePickerDemoCtl", "DatePicker_16x", "" ],
|
[ "DatePicker", "DatePickerDemoCtl", "DatePicker_16x", "" ],
|
||||||
[ "Clock", "ClockDemoCtl", "Time_color_16x", "" ],
|
[ "Clock", "ClockDemoCtl", "Time_color_16x", "" ],
|
||||||
[ "TimePicker", "TimePickerDemoCtl", "TimePicker_16x", "" ],
|
[ "TimePicker", "TimePickerDemoCtl", "TimePicker_16x", "" ],
|
||||||
@@ -65,14 +67,14 @@
|
|||||||
[ "OutlineText", "OutlineTextDemoCtl", "TextBlock_16x", "" ],
|
[ "OutlineText", "OutlineTextDemoCtl", "TextBlock_16x", "" ],
|
||||||
[ "RunningBlock", "RunningBlockDemoCtl", "Dynamic_16x", "" ],
|
[ "RunningBlock", "RunningBlockDemoCtl", "Dynamic_16x", "" ],
|
||||||
[ "Card", "CardDemoCtl", "VSO_Card_16x", "" ],
|
[ "Card", "CardDemoCtl", "VSO_Card_16x", "" ],
|
||||||
[ "Divider", "DividerDemoCtl", "DottedSplitter_16x", "1" ],
|
[ "Divider", "DividerDemoCtl", "DottedSplitter_16x", "" ],
|
||||||
[ "CirclePanel", "CirclePanelDemoCtl", "ColorWheel_16x", "" ],
|
[ "CirclePanel", "CirclePanelDemoCtl", "ColorWheel_16x", "" ],
|
||||||
[ "Grid", "GridDemoCtl", "GridPane_16x", "" ],
|
[ "Grid", "GridDemoCtl", "GridPane_16x", "" ],
|
||||||
[ "RelativePanel", "RelativePanelDemoCtl", "TransformRelative_16x", "1" ],
|
[ "RelativePanel", "RelativePanelDemoCtl", "TransformRelative_16x", "1" ],
|
||||||
[ "WaterfallPanel", "WaterfallPanelDemoCtl", "Panel_16x", "" ],
|
[ "WaterfallPanel", "WaterfallPanelDemoCtl", "Panel_16x", "" ],
|
||||||
[ "HoneycombPanel", "HoneycombPanelDemoCtl", "PolygonHexagon_16x", "" ],
|
[ "HoneycombPanel", "HoneycombPanelDemoCtl", "PolygonHexagon_16x", "" ],
|
||||||
[ "TransitioningContentControl", "TransitioningContentControlDemoCtl", "TransitioningContentControl_16x", "" ],
|
[ "TransitioningContentControl", "TransitioningContentControlDemoCtl", "TransitioningContentControl_16x", "" ],
|
||||||
[ "Drawer", "DrawerDemoCtl", "View_Portrait_16x", "1" ],
|
[ "Drawer", "DrawerDemoCtl", "View_Portrait_16x", "" ],
|
||||||
[ "CoverView", "CoverViewDemoCtl", "DetailDataView_16x", "" ],
|
[ "CoverView", "CoverViewDemoCtl", "DetailDataView_16x", "" ],
|
||||||
[ "CoverFlow", "CoverFlowDemoCtl", "LinearCarousel_16x", "" ],
|
[ "CoverFlow", "CoverFlowDemoCtl", "LinearCarousel_16x", "" ],
|
||||||
[ "ProgressBar", "ProgressBarDemoCtl", "ProgressBar_16x", "" ],
|
[ "ProgressBar", "ProgressBarDemoCtl", "ProgressBar_16x", "" ],
|
||||||
@@ -94,7 +96,7 @@
|
|||||||
[ "Sprite", "SpriteDemoCtl", "HandyControl", "" ],
|
[ "Sprite", "SpriteDemoCtl", "HandyControl", "" ],
|
||||||
[ "Notification", "NotificationDemoCtl", "Procedure_16x", "" ],
|
[ "Notification", "NotificationDemoCtl", "Procedure_16x", "" ],
|
||||||
[ "Dialog", "DialogDemoCtl", "Dialog_16x", "" ],
|
[ "Dialog", "DialogDemoCtl", "Dialog_16x", "" ],
|
||||||
[ "Window", "WindowDemoCtl", "WindowsForm_16x", "" ]
|
[ "Window", "WindowDemoCtl", "WindowsForm_16x", "1" ]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,202 +2,6 @@
|
|||||||
{
|
{
|
||||||
public class MessageToken
|
public class MessageToken
|
||||||
{
|
{
|
||||||
/*-------------------- Controls --------------------*/
|
|
||||||
|
|
||||||
public static readonly string GrowlDemoCtl = nameof(GrowlDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string LoadingDemoCtl = nameof(LoadingDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ImageBrowserDemoCtl = nameof(ImageBrowserDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ColorPickerDemoCtl = nameof(ColorPickerDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string CarouselDemoCtl = nameof(CarouselDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string CompareSliderDemoCtl = nameof(CompareSliderDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string TimeBarDemoCtl = nameof(TimeBarDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string PaginationDemoCtl = nameof(PaginationDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string AnimationPathDemoCtl = nameof(AnimationPathDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string StepBarDemoCtl = nameof(StepBarDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ClockDemoCtl = nameof(ClockDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string TimePickerDemoCtl = nameof(TimePickerDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string CirclePanelDemoCtl = nameof(CirclePanelDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string NumericUpDownDemoCtl = nameof(NumericUpDownDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string WindowDemoCtl = nameof(WindowDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ScrollViewerDemoCtl = nameof(ScrollViewerDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string PreviewSliderDemoCtl = nameof(PreviewSliderDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ProgressBarDemoCtl = nameof(ProgressBarDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string TextBoxDemoCtl = nameof(TextBoxDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ComboBoxDemoCtl = nameof(ComboBoxDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string PasswordBoxDemoCtl = nameof(PasswordBoxDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string DatePickerDemoCtl = nameof(DatePickerDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string DateTimePickerDemoCtl = nameof(DateTimePickerDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string CalendarWithClockDemoCtl = nameof(CalendarWithClockDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string SearchBarDemoCtl = nameof(SearchBarDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string TagDemoCtl = nameof(TagDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string GifImageDemoCtl = nameof(GifImageDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string OutlineTextDemoCtl = nameof(OutlineTextDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string FlipClockDemoCtl = nameof(FlipClockDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string QQGroupView = nameof(QQGroupView);
|
|
||||||
|
|
||||||
public static readonly string BlurWindow = nameof(BlurWindow);
|
|
||||||
|
|
||||||
public static readonly string NoNonClientAreaDragableWindow = nameof(NoNonClientAreaDragableWindow);
|
|
||||||
|
|
||||||
public static readonly string RateDemoCtl = nameof(RateDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ShieldDemoCtl = nameof(ShieldDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string WaterfallPanelDemoCtl = nameof(WaterfallPanelDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string CoverViewDemoCtl = nameof(CoverViewDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string CoverFlowDemoCtl = nameof(CoverFlowDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ProgressButtonDemoCtl = nameof(ProgressButtonDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string TransferDemoCtl = nameof(TransferDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ChatBubbleDemoCtl = nameof(ChatBubbleDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string GotoTopDemoCtl = nameof(GotoTopDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string NotifyIconDemoCtl = nameof(NotifyIconDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string BadgeDemoCtl = nameof(BadgeDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string GravatarDemoCtl = nameof(GravatarDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string DialogDemoCtl = nameof(DialogDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string SideMenuDemoCtl = nameof(SideMenuDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string GridDemoCtl = nameof(GridDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string PoptipDemoCtl = nameof(PoptipDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string RangeSliderDemoCtl = nameof(RangeSliderDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ButtonGroupDemoCtl = nameof(ButtonGroupDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string CardDemoCtl = nameof(CardDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string MagnifierDemoCtl = nameof(MagnifierDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ImageBlockDemoCtl = nameof(ImageBlockDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string RunningBlockDemoCtl = nameof(RunningBlockDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string HoneycombPanelDemoCtl = nameof(HoneycombPanelDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string SpriteDemoCtl = nameof(SpriteDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string NotificationDemoCtl = nameof(NotificationDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string FloatingBlockDemoCtl = nameof(FloatingBlockDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string SplitButtonDemoCtl = nameof(SplitButtonDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string DividerDemoCtl = nameof(DividerDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string TransitioningContentControlDemoCtl = nameof(TransitioningContentControlDemoCtl);
|
|
||||||
|
|
||||||
/*-------------------- Tools --------------------*/
|
|
||||||
|
|
||||||
public static readonly string HatchBrushGeneratorDemoCtl = nameof(HatchBrushGeneratorDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string GeometryAnimationDemoCtl = nameof(GeometryAnimationDemoCtl);
|
|
||||||
|
|
||||||
/*-------------------- Styles --------------------*/
|
|
||||||
|
|
||||||
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string RepeatButtonDemoCtl = nameof(RepeatButtonDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ExpanderDemoCtl = nameof(ExpanderDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string NativeProgressBarDemoCtl = nameof(NativeProgressBarDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string TabControlDemoCtl = nameof(TabControlDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string CalendarDemoCtl = nameof(CalendarDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string NativeDatePickerDemoCtl = nameof(NativeDatePickerDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string NativeTextBoxDemoCtl = nameof(NativeTextBoxDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string TextBlockDemoCtl = nameof(TextBlockDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string NativeComboBoxDemoCtl = nameof(NativeComboBoxDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string NativePasswordBoxDemoCtl = nameof(NativePasswordBoxDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string NativeTabControlDemoCtl = nameof(NativeTabControlDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string DataGridDemoCtl = nameof(DataGridDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string CheckBoxDemoCtl = nameof(CheckBoxDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ListBoxDemoCtl = nameof(ListBoxDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string MenuDemoCtl = nameof(MenuDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string TreeViewDemoCtl = nameof(TreeViewDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string BorderDemoCtl = nameof(BorderDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string RadioButtonDemoCtl = nameof(RadioButtonDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string NativeScrollViewerDemoCtl = nameof(NativeScrollViewerDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string BrushDemoCtl = nameof(BrushDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string SliderDemoCtl = nameof(SliderDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string GroupBoxDemoCtl = nameof(GroupBoxDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ListViewDemoCtl = nameof(ListViewDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string RichTextBoxDemoCtl = nameof(RichTextBoxDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string ToolBarDemoCtl = nameof(ToolBarDemoCtl);
|
|
||||||
|
|
||||||
public static readonly string LabelDemoCtl = nameof(LabelDemoCtl);
|
|
||||||
|
|
||||||
/*-------------------- Windows --------------------*/
|
|
||||||
|
|
||||||
public static readonly string CommonWindow = nameof(CommonWindow);
|
|
||||||
|
|
||||||
public static readonly string CustomNonClientAreaWindow = nameof(CustomNonClientAreaWindow);
|
|
||||||
|
|
||||||
/*-------------------- Messages --------------------*/
|
|
||||||
|
|
||||||
public static readonly string LoadShowContent = nameof(LoadShowContent);
|
public static readonly string LoadShowContent = nameof(LoadShowContent);
|
||||||
|
|
||||||
public static readonly string FullSwitch = nameof(FullSwitch);
|
public static readonly string FullSwitch = nameof(FullSwitch);
|
||||||
@@ -226,5 +30,17 @@
|
|||||||
|
|
||||||
public static readonly string NotifyIconContextDemo = nameof(NotifyIconContextDemo);
|
public static readonly string NotifyIconContextDemo = nameof(NotifyIconContextDemo);
|
||||||
|
|
||||||
|
public static readonly string CommonWindow = nameof(CommonWindow);
|
||||||
|
|
||||||
|
public static readonly string BlurWindow = nameof(BlurWindow);
|
||||||
|
|
||||||
|
public static readonly string CustomNonClientAreaWindow = nameof(CustomNonClientAreaWindow);
|
||||||
|
|
||||||
|
public static readonly string NoNonClientAreaDragableWindow = nameof(NoNonClientAreaDragableWindow);
|
||||||
|
|
||||||
|
public static readonly string QQGroupView = nameof(QQGroupView);
|
||||||
|
|
||||||
|
public static readonly string GlowWindow = nameof(GlowWindow);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,111 +2,6 @@
|
|||||||
<#@ import namespace="System.Collections.Generic"#>
|
<#@ import namespace="System.Collections.Generic"#>
|
||||||
<#@ output extension=".cs" #>
|
<#@ output extension=".cs" #>
|
||||||
<#
|
<#
|
||||||
var controlList = new List<string>
|
|
||||||
{
|
|
||||||
"GrowlDemoCtl",
|
|
||||||
"LoadingDemoCtl",
|
|
||||||
"ImageBrowserDemoCtl",
|
|
||||||
"ColorPickerDemoCtl",
|
|
||||||
"CarouselDemoCtl",
|
|
||||||
"CompareSliderDemoCtl",
|
|
||||||
"TimeBarDemoCtl",
|
|
||||||
"PaginationDemoCtl",
|
|
||||||
"AnimationPathDemoCtl",
|
|
||||||
"StepBarDemoCtl",
|
|
||||||
"ClockDemoCtl",
|
|
||||||
"TimePickerDemoCtl",
|
|
||||||
"CirclePanelDemoCtl",
|
|
||||||
"NumericUpDownDemoCtl",
|
|
||||||
"WindowDemoCtl",
|
|
||||||
"ScrollViewerDemoCtl",
|
|
||||||
"PreviewSliderDemoCtl",
|
|
||||||
"ProgressBarDemoCtl",
|
|
||||||
"TextBoxDemoCtl",
|
|
||||||
"ComboBoxDemoCtl",
|
|
||||||
"PasswordBoxDemoCtl",
|
|
||||||
"DatePickerDemoCtl",
|
|
||||||
"DateTimePickerDemoCtl",
|
|
||||||
"CalendarWithClockDemoCtl",
|
|
||||||
"SearchBarDemoCtl",
|
|
||||||
"TagDemoCtl",
|
|
||||||
"GifImageDemoCtl",
|
|
||||||
"OutlineTextDemoCtl",
|
|
||||||
"FlipClockDemoCtl",
|
|
||||||
"QQGroupView",
|
|
||||||
"BlurWindow",
|
|
||||||
"NoNonClientAreaDragableWindow",
|
|
||||||
"RateDemoCtl",
|
|
||||||
"ShieldDemoCtl",
|
|
||||||
"WaterfallPanelDemoCtl",
|
|
||||||
"CoverViewDemoCtl",
|
|
||||||
"CoverFlowDemoCtl",
|
|
||||||
"ProgressButtonDemoCtl",
|
|
||||||
"TransferDemoCtl",
|
|
||||||
"ChatBubbleDemoCtl",
|
|
||||||
"GotoTopDemoCtl",
|
|
||||||
"NotifyIconDemoCtl",
|
|
||||||
"BadgeDemoCtl",
|
|
||||||
"GravatarDemoCtl",
|
|
||||||
"DialogDemoCtl",
|
|
||||||
"SideMenuDemoCtl",
|
|
||||||
"GridDemoCtl",
|
|
||||||
"PoptipDemoCtl",
|
|
||||||
"RangeSliderDemoCtl",
|
|
||||||
"ButtonGroupDemoCtl",
|
|
||||||
"CardDemoCtl",
|
|
||||||
"MagnifierDemoCtl",
|
|
||||||
"ImageBlockDemoCtl",
|
|
||||||
"RunningBlockDemoCtl",
|
|
||||||
"HoneycombPanelDemoCtl",
|
|
||||||
"SpriteDemoCtl",
|
|
||||||
"NotificationDemoCtl",
|
|
||||||
"FloatingBlockDemoCtl",
|
|
||||||
"SplitButtonDemoCtl",
|
|
||||||
"DividerDemoCtl",
|
|
||||||
"TransitioningContentControlDemoCtl"
|
|
||||||
};
|
|
||||||
var styleList = new List<string>
|
|
||||||
{
|
|
||||||
"ButtonDemoCtl",
|
|
||||||
"RepeatButtonDemoCtl",
|
|
||||||
"ToggleButtonDemoCtl",
|
|
||||||
"ExpanderDemoCtl",
|
|
||||||
"NativeProgressBarDemoCtl",
|
|
||||||
"TabControlDemoCtl",
|
|
||||||
"CalendarDemoCtl",
|
|
||||||
"NativeDatePickerDemoCtl",
|
|
||||||
"NativeTextBoxDemoCtl",
|
|
||||||
"TextBlockDemoCtl",
|
|
||||||
"NativeComboBoxDemoCtl",
|
|
||||||
"NativePasswordBoxDemoCtl",
|
|
||||||
"NativeTabControlDemoCtl",
|
|
||||||
"DataGridDemoCtl",
|
|
||||||
"CheckBoxDemoCtl",
|
|
||||||
"ListBoxDemoCtl",
|
|
||||||
"MenuDemoCtl",
|
|
||||||
"TreeViewDemoCtl",
|
|
||||||
"BorderDemoCtl",
|
|
||||||
"RadioButtonDemoCtl",
|
|
||||||
"NativeScrollViewerDemoCtl",
|
|
||||||
"BrushDemoCtl",
|
|
||||||
"SliderDemoCtl",
|
|
||||||
"GroupBoxDemoCtl",
|
|
||||||
"ListViewDemoCtl",
|
|
||||||
"RichTextBoxDemoCtl",
|
|
||||||
"ToolBarDemoCtl",
|
|
||||||
"LabelDemoCtl"
|
|
||||||
};
|
|
||||||
var toolList = new List<string>
|
|
||||||
{
|
|
||||||
"HatchBrushGeneratorDemoCtl",
|
|
||||||
"GeometryAnimationDemoCtl"
|
|
||||||
};
|
|
||||||
var windowList = new List<string>
|
|
||||||
{
|
|
||||||
"CommonWindow",
|
|
||||||
"CustomNonClientAreaWindow"
|
|
||||||
};
|
|
||||||
var messageList = new List<string>
|
var messageList = new List<string>
|
||||||
{
|
{
|
||||||
"LoadShowContent",
|
"LoadShowContent",
|
||||||
@@ -122,39 +17,19 @@ var messageList = new List<string>
|
|||||||
"BlogsView",
|
"BlogsView",
|
||||||
"WebsitesView",
|
"WebsitesView",
|
||||||
"NotifyIconDemo",
|
"NotifyIconDemo",
|
||||||
"NotifyIconContextDemo"
|
"NotifyIconContextDemo",
|
||||||
|
"CommonWindow",
|
||||||
|
"BlurWindow",
|
||||||
|
"CustomNonClientAreaWindow",
|
||||||
|
"NoNonClientAreaDragableWindow",
|
||||||
|
"QQGroupView",
|
||||||
|
"GlowWindow"
|
||||||
};
|
};
|
||||||
#>
|
#>
|
||||||
namespace HandyControlDemo.Data
|
namespace HandyControlDemo.Data
|
||||||
{
|
{
|
||||||
public class MessageToken
|
public class MessageToken
|
||||||
{
|
{
|
||||||
/*-------------------- Controls --------------------*/
|
|
||||||
|
|
||||||
<#foreach(var item in controlList){#>
|
|
||||||
public static readonly string <#=item#> = nameof(<#=item#>);
|
|
||||||
|
|
||||||
<#}#>
|
|
||||||
/*-------------------- Tools --------------------*/
|
|
||||||
|
|
||||||
<#foreach(var item in toolList){#>
|
|
||||||
public static readonly string <#=item#> = nameof(<#=item#>);
|
|
||||||
|
|
||||||
<#}#>
|
|
||||||
/*-------------------- Styles --------------------*/
|
|
||||||
|
|
||||||
<#foreach(var item in styleList){#>
|
|
||||||
public static readonly string <#=item#> = nameof(<#=item#>);
|
|
||||||
|
|
||||||
<#}#>
|
|
||||||
/*-------------------- Windows --------------------*/
|
|
||||||
|
|
||||||
<#foreach(var item in windowList){#>
|
|
||||||
public static readonly string <#=item#> = nameof(<#=item#>);
|
|
||||||
|
|
||||||
<#}#>
|
|
||||||
/*-------------------- Messages --------------------*/
|
|
||||||
|
|
||||||
<#foreach(var item in messageList){#>
|
<#foreach(var item in messageList){#>
|
||||||
public static readonly string <#=item#> = nameof(<#=item#>);
|
public static readonly string <#=item#> = nameof(<#=item#>);
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,9 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\NotificationDemoCtl.xaml.cs">
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\NotificationDemoCtl.xaml.cs">
|
||||||
<DependentUpon>NotificationDemoCtl.xaml</DependentUpon>
|
<DependentUpon>NotificationDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\PinBoxDemoCtl.xaml.cs">
|
||||||
|
<DependentUpon>PinBoxDemoCtl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\RangeSliderDemoCtl.xaml.cs">
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\RangeSliderDemoCtl.xaml.cs">
|
||||||
<DependentUpon>RangeSliderDemoCtl.xaml</DependentUpon>
|
<DependentUpon>RangeSliderDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -290,6 +293,9 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\ExpanderDemoCtl.xaml.cs">
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\ExpanderDemoCtl.xaml.cs">
|
||||||
<DependentUpon>ExpanderDemoCtl.xaml</DependentUpon>
|
<DependentUpon>ExpanderDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\FlowDocumentScrollViewerDemoCtl.xaml.cs">
|
||||||
|
<DependentUpon>FlowDocumentScrollViewerDemoCtl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\GroupBoxDemoCtl.xaml.cs">
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Styles\GroupBoxDemoCtl.xaml.cs">
|
||||||
<DependentUpon>GroupBoxDemoCtl.xaml</DependentUpon>
|
<DependentUpon>GroupBoxDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -401,6 +407,9 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)Window\DialogDemoWindow.xaml.cs">
|
<Compile Include="$(MSBuildThisFileDirectory)Window\DialogDemoWindow.xaml.cs">
|
||||||
<DependentUpon>DialogDemoWindow.xaml</DependentUpon>
|
<DependentUpon>DialogDemoWindow.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)Window\GlowWindow.xaml.cs">
|
||||||
|
<DependentUpon>GlowWindow.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Window\GrowlDemoWindow.xaml.cs">
|
<Compile Include="$(MSBuildThisFileDirectory)Window\GrowlDemoWindow.xaml.cs">
|
||||||
<DependentUpon>GrowlDemoWindow.xaml</DependentUpon>
|
<DependentUpon>GrowlDemoWindow.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -513,6 +522,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\PinBoxDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\RangeSliderDemoCtl.xaml">
|
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\RangeSliderDemoCtl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -793,6 +806,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="$(MSBuildThisFileDirectory)UserControl\Styles\FlowDocumentScrollViewerDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Styles\GroupBoxDemoCtl.xaml">
|
<Page Include="$(MSBuildThisFileDirectory)UserControl\Styles\GroupBoxDemoCtl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -909,6 +926,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="$(MSBuildThisFileDirectory)Window\GlowWindow.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="$(MSBuildThisFileDirectory)Window\GrowlDemoWindow.xaml">
|
<Page Include="$(MSBuildThisFileDirectory)Window\GrowlDemoWindow.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
|
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
|
||||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Style="{StaticResource WindowBlur}"
|
|
||||||
Title="HandyControlDemo"
|
Title="HandyControlDemo"
|
||||||
ShowTitle="False"
|
ShowTitle="False"
|
||||||
ResizeMode="CanResizeWithGrip"
|
ResizeMode="CanResizeWithGrip"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.Windows;
|
|||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("HandyControlDemo")]
|
[assembly: AssemblyProduct("HandyControlDemo")]
|
||||||
[assembly: AssemblyCopyright("Copyright © HandyOrg 2018-2019")]
|
[assembly: AssemblyCopyright("Copyright © HandyOrg 2018-2020")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|||||||
@@ -627,6 +627,15 @@ namespace HandyControlDemo.Properties.Langs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 流文档滚动视图 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string FlowDocumentScrollViewer {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("FlowDocumentScrollViewer", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Gif图片 的本地化字符串。
|
/// 查找类似 Gif图片 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1041,6 +1050,15 @@ namespace HandyControlDemo.Properties.Langs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 点击打开辉光窗口 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string OpenGlowWindow {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("OpenGlowWindow", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 点击打开图片浏览器 的本地化字符串。
|
/// 查找类似 点击打开图片浏览器 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1131,6 +1149,15 @@ namespace HandyControlDemo.Properties.Langs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 PIN码框 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string PinBox {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("PinBox", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 请输入... 的本地化字符串。
|
/// 查找类似 请输入... 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -169,7 +169,7 @@
|
|||||||
<value>Pagination</value>
|
<value>Pagination</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="OpenImageBrowser" xml:space="preserve">
|
<data name="OpenImageBrowser" xml:space="preserve">
|
||||||
<value>Click to open image browser </value>
|
<value>Click to open image browser</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ProgressBar" xml:space="preserve">
|
<data name="ProgressBar" xml:space="preserve">
|
||||||
<value>ProgressBar</value>
|
<value>ProgressBar</value>
|
||||||
@@ -232,7 +232,7 @@
|
|||||||
<value>Fill in the basic information</value>
|
<value>Fill in the basic information</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="UploadFile" xml:space="preserve">
|
<data name="UploadFile" xml:space="preserve">
|
||||||
<value>Upload file </value>
|
<value>Upload file</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Complete" xml:space="preserve">
|
<data name="Complete" xml:space="preserve">
|
||||||
<value>Complete</value>
|
<value>Complete</value>
|
||||||
@@ -319,7 +319,7 @@
|
|||||||
<value>Menu</value>
|
<value>Menu</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RightClickHere" xml:space="preserve">
|
<data name="RightClickHere" xml:space="preserve">
|
||||||
<value>Right click here </value>
|
<value>Right click here</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RadioButton" xml:space="preserve">
|
<data name="RadioButton" xml:space="preserve">
|
||||||
<value>RadioButton</value>
|
<value>RadioButton</value>
|
||||||
@@ -711,4 +711,13 @@
|
|||||||
<data name="Demo" xml:space="preserve">
|
<data name="Demo" xml:space="preserve">
|
||||||
<value>Demo</value>
|
<value>Demo</value>
|
||||||
</data>
|
</data>
|
||||||
|
<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>
|
</root>
|
||||||
@@ -711,4 +711,13 @@
|
|||||||
<data name="Demo" xml:space="preserve">
|
<data name="Demo" xml:space="preserve">
|
||||||
<value>Demo</value>
|
<value>Demo</value>
|
||||||
</data>
|
</data>
|
||||||
|
<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>
|
</root>
|
||||||
@@ -711,4 +711,13 @@
|
|||||||
<data name="Demo" xml:space="preserve">
|
<data name="Demo" xml:space="preserve">
|
||||||
<value>Demo</value>
|
<value>Demo</value>
|
||||||
</data>
|
</data>
|
||||||
|
<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>
|
</root>
|
||||||
@@ -0,0 +1,723 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="About" xml:space="preserve">
|
||||||
|
<value>About</value>
|
||||||
|
</data>
|
||||||
|
<data name="AddItem" xml:space="preserve">
|
||||||
|
<value>Add an item</value>
|
||||||
|
</data>
|
||||||
|
<data name="AnimationPath" xml:space="preserve">
|
||||||
|
<value>AnimationPath</value>
|
||||||
|
</data>
|
||||||
|
<data name="AppClosingTip" xml:space="preserve">
|
||||||
|
<value>The tray icon is open and will hide the window instead of closing the program</value>
|
||||||
|
</data>
|
||||||
|
<data name="Ask" xml:space="preserve">
|
||||||
|
<value>Ask</value>
|
||||||
|
</data>
|
||||||
|
<data name="Badge" xml:space="preserve">
|
||||||
|
<value>Badge</value>
|
||||||
|
</data>
|
||||||
|
<data name="BasicInfo" xml:space="preserve">
|
||||||
|
<value>Fill in the basic information</value>
|
||||||
|
</data>
|
||||||
|
<data name="BasicLayout" xml:space="preserve">
|
||||||
|
<value>Basic layout</value>
|
||||||
|
</data>
|
||||||
|
<data name="Blink" xml:space="preserve">
|
||||||
|
<value>Blink</value>
|
||||||
|
</data>
|
||||||
|
<data name="Blog" xml:space="preserve">
|
||||||
|
<value>Blog</value>
|
||||||
|
</data>
|
||||||
|
<data name="Border" xml:space="preserve">
|
||||||
|
<value>Border</value>
|
||||||
|
</data>
|
||||||
|
<data name="Brush" xml:space="preserve">
|
||||||
|
<value>Brush</value>
|
||||||
|
</data>
|
||||||
|
<data name="Button" xml:space="preserve">
|
||||||
|
<value>Button</value>
|
||||||
|
</data>
|
||||||
|
<data name="ButtonCustom" xml:space="preserve">
|
||||||
|
<value>Custom button</value>
|
||||||
|
</data>
|
||||||
|
<data name="ButtonGroup" xml:space="preserve">
|
||||||
|
<value>ButtonGroup</value>
|
||||||
|
</data>
|
||||||
|
<data name="Calendar" xml:space="preserve">
|
||||||
|
<value>Calendar</value>
|
||||||
|
</data>
|
||||||
|
<data name="CalendarWithClock" xml:space="preserve">
|
||||||
|
<value>CalendarWithClock</value>
|
||||||
|
</data>
|
||||||
|
<data name="Card" xml:space="preserve">
|
||||||
|
<value>Card</value>
|
||||||
|
</data>
|
||||||
|
<data name="Carousel" xml:space="preserve">
|
||||||
|
<value>Carousel</value>
|
||||||
|
</data>
|
||||||
|
<data name="ChangeLangAsk" xml:space="preserve">
|
||||||
|
<value>Whether to restart to change the language?</value>
|
||||||
|
</data>
|
||||||
|
<data name="ChatBubble" xml:space="preserve">
|
||||||
|
<value>ChatBubble</value>
|
||||||
|
</data>
|
||||||
|
<data name="Chatroom" xml:space="preserve">
|
||||||
|
<value>Chatroom</value>
|
||||||
|
</data>
|
||||||
|
<data name="CheckBox" xml:space="preserve">
|
||||||
|
<value>CheckBox</value>
|
||||||
|
</data>
|
||||||
|
<data name="CirclePanel" xml:space="preserve">
|
||||||
|
<value>CirclePanel</value>
|
||||||
|
</data>
|
||||||
|
<data name="Clear" xml:space="preserve">
|
||||||
|
<value>Clear</value>
|
||||||
|
</data>
|
||||||
|
<data name="Click2Count" xml:space="preserve">
|
||||||
|
<value>Click to count</value>
|
||||||
|
</data>
|
||||||
|
<data name="Clock" xml:space="preserve">
|
||||||
|
<value>Clock</value>
|
||||||
|
</data>
|
||||||
|
<data name="ColorPicker" xml:space="preserve">
|
||||||
|
<value>ColorPicker</value>
|
||||||
|
</data>
|
||||||
|
<data name="ColumnOffset" xml:space="preserve">
|
||||||
|
<value>Column offset</value>
|
||||||
|
</data>
|
||||||
|
<data name="ColumnSpacing" xml:space="preserve">
|
||||||
|
<value>Column spacing</value>
|
||||||
|
</data>
|
||||||
|
<data name="ComboBox" xml:space="preserve">
|
||||||
|
<value>ComboBox</value>
|
||||||
|
</data>
|
||||||
|
<data name="ComingSoon" xml:space="preserve">
|
||||||
|
<value>Coming Soon</value>
|
||||||
|
</data>
|
||||||
|
<data name="Comment" xml:space="preserve">
|
||||||
|
<value>Comment</value>
|
||||||
|
</data>
|
||||||
|
<data name="Common" xml:space="preserve">
|
||||||
|
<value>Common</value>
|
||||||
|
</data>
|
||||||
|
<data name="CompareSlider" xml:space="preserve">
|
||||||
|
<value>CompareSlider</value>
|
||||||
|
</data>
|
||||||
|
<data name="Complete" xml:space="preserve">
|
||||||
|
<value>Complete</value>
|
||||||
|
</data>
|
||||||
|
<data name="ContentDemoStr" xml:space="preserve">
|
||||||
|
<value>This is the content</value>
|
||||||
|
</data>
|
||||||
|
<data name="Contributors" xml:space="preserve">
|
||||||
|
<value>Contributors</value>
|
||||||
|
</data>
|
||||||
|
<data name="Controls" xml:space="preserve">
|
||||||
|
<value>Controls</value>
|
||||||
|
</data>
|
||||||
|
<data name="CoverFlow" xml:space="preserve">
|
||||||
|
<value>CoverFlow</value>
|
||||||
|
</data>
|
||||||
|
<data name="CoverView" xml:space="preserve">
|
||||||
|
<value>CoverView</value>
|
||||||
|
</data>
|
||||||
|
<data name="Danger" xml:space="preserve">
|
||||||
|
<value>Danger</value>
|
||||||
|
</data>
|
||||||
|
<data name="DataGrid" xml:space="preserve">
|
||||||
|
<value>DataGrid</value>
|
||||||
|
</data>
|
||||||
|
<data name="DatePicker" xml:space="preserve">
|
||||||
|
<value>DatePicker</value>
|
||||||
|
</data>
|
||||||
|
<data name="DateTimePicker" xml:space="preserve">
|
||||||
|
<value>DateTimePicker</value>
|
||||||
|
</data>
|
||||||
|
<data name="Default" xml:space="preserve">
|
||||||
|
<value>Default</value>
|
||||||
|
</data>
|
||||||
|
<data name="Demo" xml:space="preserve">
|
||||||
|
<value>Demo</value>
|
||||||
|
</data>
|
||||||
|
<data name="Dialog" xml:space="preserve">
|
||||||
|
<value>Dialog</value>
|
||||||
|
</data>
|
||||||
|
<data name="DialogDemo" xml:space="preserve">
|
||||||
|
<value>Dialog demo</value>
|
||||||
|
</data>
|
||||||
|
<data name="Divider" xml:space="preserve">
|
||||||
|
<value>Divider</value>
|
||||||
|
</data>
|
||||||
|
<data name="Documentation" xml:space="preserve">
|
||||||
|
<value>Documentation</value>
|
||||||
|
</data>
|
||||||
|
<data name="Doc_cn" xml:space="preserve">
|
||||||
|
<value>Chinese document</value>
|
||||||
|
</data>
|
||||||
|
<data name="Doc_en" xml:space="preserve">
|
||||||
|
<value>English document</value>
|
||||||
|
</data>
|
||||||
|
<data name="DragHere" xml:space="preserve">
|
||||||
|
<value>Drag here</value>
|
||||||
|
</data>
|
||||||
|
<data name="Drawer" xml:space="preserve">
|
||||||
|
<value>Drawer</value>
|
||||||
|
</data>
|
||||||
|
<data name="Effects" xml:space="preserve">
|
||||||
|
<value>Effects</value>
|
||||||
|
</data>
|
||||||
|
<data name="Email" xml:space="preserve">
|
||||||
|
<value>Email</value>
|
||||||
|
</data>
|
||||||
|
<data name="Error" xml:space="preserve">
|
||||||
|
<value>Error</value>
|
||||||
|
</data>
|
||||||
|
<data name="Exit" xml:space="preserve">
|
||||||
|
<value>Exit</value>
|
||||||
|
</data>
|
||||||
|
<data name="Expander" xml:space="preserve">
|
||||||
|
<value>Expander</value>
|
||||||
|
</data>
|
||||||
|
<data name="Fatal" xml:space="preserve">
|
||||||
|
<value>Fatal</value>
|
||||||
|
</data>
|
||||||
|
<data name="FlipClock" xml:space="preserve">
|
||||||
|
<value>FlipClock</value>
|
||||||
|
</data>
|
||||||
|
<data name="FloatingBlock" xml:space="preserve">
|
||||||
|
<value>FloatingBlock</value>
|
||||||
|
</data>
|
||||||
|
<data name="GifImage" xml:space="preserve">
|
||||||
|
<value>GifImage</value>
|
||||||
|
</data>
|
||||||
|
<data name="GotoTop" xml:space="preserve">
|
||||||
|
<value>GotoTop</value>
|
||||||
|
</data>
|
||||||
|
<data name="Gravatar" xml:space="preserve">
|
||||||
|
<value>Gravatar</value>
|
||||||
|
</data>
|
||||||
|
<data name="Grid" xml:space="preserve">
|
||||||
|
<value>Grid</value>
|
||||||
|
</data>
|
||||||
|
<data name="GroupBox" xml:space="preserve">
|
||||||
|
<value>GroupBox</value>
|
||||||
|
</data>
|
||||||
|
<data name="Groups" xml:space="preserve">
|
||||||
|
<value>Groups</value>
|
||||||
|
</data>
|
||||||
|
<data name="Growl" xml:space="preserve">
|
||||||
|
<value>Growl</value>
|
||||||
|
</data>
|
||||||
|
<data name="GrowlAsk" xml:space="preserve">
|
||||||
|
<value>A new version has been detected!Do you want to update?</value>
|
||||||
|
</data>
|
||||||
|
<data name="GrowlDemo" xml:space="preserve">
|
||||||
|
<value>Growl demo</value>
|
||||||
|
</data>
|
||||||
|
<data name="GrowlError" xml:space="preserve">
|
||||||
|
<value>Connection failed. please check your network!</value>
|
||||||
|
</data>
|
||||||
|
<data name="GrowlFatal" xml:space="preserve">
|
||||||
|
<value>The program has crashed~~~</value>
|
||||||
|
</data>
|
||||||
|
<data name="GrowlInfo" xml:space="preserve">
|
||||||
|
<value>It's a nice day today~~~</value>
|
||||||
|
</data>
|
||||||
|
<data name="GrowlSuccess" xml:space="preserve">
|
||||||
|
<value>File saved successfully!</value>
|
||||||
|
</data>
|
||||||
|
<data name="GrowlWarning" xml:space="preserve">
|
||||||
|
<value>Disk space is running out!</value>
|
||||||
|
</data>
|
||||||
|
<data name="HatchBrushGenerator" xml:space="preserve">
|
||||||
|
<value>HatchBrushGenerator</value>
|
||||||
|
</data>
|
||||||
|
<data name="HoneycombPanel" xml:space="preserve">
|
||||||
|
<value>HoneycombPanel</value>
|
||||||
|
</data>
|
||||||
|
<data name="HybridLayout" xml:space="preserve">
|
||||||
|
<value>Hybrid layout</value>
|
||||||
|
</data>
|
||||||
|
<data name="Ignore" xml:space="preserve">
|
||||||
|
<value>Ignore</value>
|
||||||
|
</data>
|
||||||
|
<data name="ImageBlock" xml:space="preserve">
|
||||||
|
<value>ImageBlock</value>
|
||||||
|
</data>
|
||||||
|
<data name="ImageBrowser" xml:space="preserve">
|
||||||
|
<value>ImageBrowser</value>
|
||||||
|
</data>
|
||||||
|
<data name="Index" xml:space="preserve">
|
||||||
|
<value>Index</value>
|
||||||
|
</data>
|
||||||
|
<data name="Info" xml:space="preserve">
|
||||||
|
<value>Info</value>
|
||||||
|
</data>
|
||||||
|
<data name="InteractiveDialog" xml:space="preserve">
|
||||||
|
<value>Interactive Dialog</value>
|
||||||
|
</data>
|
||||||
|
<data name="IsNotPhone" xml:space="preserve">
|
||||||
|
<value>It's not a phone number</value>
|
||||||
|
</data>
|
||||||
|
<data name="Label" xml:space="preserve">
|
||||||
|
<value>Label</value>
|
||||||
|
</data>
|
||||||
|
<data name="ListBox" xml:space="preserve">
|
||||||
|
<value>ListBox</value>
|
||||||
|
</data>
|
||||||
|
<data name="ListView" xml:space="preserve">
|
||||||
|
<value>ListView</value>
|
||||||
|
</data>
|
||||||
|
<data name="Loading" xml:space="preserve">
|
||||||
|
<value>Loading</value>
|
||||||
|
</data>
|
||||||
|
<data name="Magnifier" xml:space="preserve">
|
||||||
|
<value>Magnifier</value>
|
||||||
|
</data>
|
||||||
|
<data name="Menu" xml:space="preserve">
|
||||||
|
<value>Menu</value>
|
||||||
|
</data>
|
||||||
|
<data name="MessageBox" xml:space="preserve">
|
||||||
|
<value>MessageBox</value>
|
||||||
|
</data>
|
||||||
|
<data name="Morphing Animation" xml:space="preserve">
|
||||||
|
<value>Morphing Animation</value>
|
||||||
|
</data>
|
||||||
|
<data name="Name" xml:space="preserve">
|
||||||
|
<value>Name</value>
|
||||||
|
</data>
|
||||||
|
<data name="NewWindow" xml:space="preserve">
|
||||||
|
<value>New window</value>
|
||||||
|
</data>
|
||||||
|
<data name="Next" xml:space="preserve">
|
||||||
|
<value>Next</value>
|
||||||
|
</data>
|
||||||
|
<data name="Notification" xml:space="preserve">
|
||||||
|
<value>Notification</value>
|
||||||
|
</data>
|
||||||
|
<data name="NotifyIcon" xml:space="preserve">
|
||||||
|
<value>NotifyIcon</value>
|
||||||
|
</data>
|
||||||
|
<data name="NumericUpDown" xml:space="preserve">
|
||||||
|
<value>NumericUpDown</value>
|
||||||
|
</data>
|
||||||
|
<data name="Off" xml:space="preserve">
|
||||||
|
<value>Off</value>
|
||||||
|
</data>
|
||||||
|
<data name="Ok" xml:space="preserve">
|
||||||
|
<value>Ok</value>
|
||||||
|
</data>
|
||||||
|
<data name="On" xml:space="preserve">
|
||||||
|
<value>On</value>
|
||||||
|
</data>
|
||||||
|
<data name="OpenBlurWindow" xml:space="preserve">
|
||||||
|
<value>open blur window</value>
|
||||||
|
</data>
|
||||||
|
<data name="OpenCommonWindow" xml:space="preserve">
|
||||||
|
<value>open common window</value>
|
||||||
|
</data>
|
||||||
|
<data name="OpenCustomContentWindow" xml:space="preserve">
|
||||||
|
<value>open custom content window</value>
|
||||||
|
</data>
|
||||||
|
<data name="OpenCustomMessageWindow" xml:space="preserve">
|
||||||
|
<value>open custom message window</value>
|
||||||
|
</data>
|
||||||
|
<data name="OpenCustomNonClientAreaWindow" xml:space="preserve">
|
||||||
|
<value>open custom Non-client Area window</value>
|
||||||
|
</data>
|
||||||
|
<data name="OpenImageBrowser" xml:space="preserve">
|
||||||
|
<value>Click to open image browser</value>
|
||||||
|
</data>
|
||||||
|
<data name="OpenMessageWindow" xml:space="preserve">
|
||||||
|
<value>open message window</value>
|
||||||
|
</data>
|
||||||
|
<data name="OpenMouseFollowWindow" xml:space="preserve">
|
||||||
|
<value>open mouse follow window</value>
|
||||||
|
</data>
|
||||||
|
<data name="OpenNoNonClientAreaDragableWindow" xml:space="preserve">
|
||||||
|
<value>open no Non-client Area dragable window</value>
|
||||||
|
</data>
|
||||||
|
<data name="OpenPanel" xml:space="preserve">
|
||||||
|
<value>Open Panel</value>
|
||||||
|
</data>
|
||||||
|
<data name="OpenSprite" xml:space="preserve">
|
||||||
|
<value>Open sprite</value>
|
||||||
|
</data>
|
||||||
|
<data name="OutlineText" xml:space="preserve">
|
||||||
|
<value>OutlineText</value>
|
||||||
|
</data>
|
||||||
|
<data name="Overview" xml:space="preserve">
|
||||||
|
<value>Overview</value>
|
||||||
|
</data>
|
||||||
|
<data name="Pagination" xml:space="preserve">
|
||||||
|
<value>Pagination</value>
|
||||||
|
</data>
|
||||||
|
<data name="PasswordBox" xml:space="preserve">
|
||||||
|
<value>PasswordBox</value>
|
||||||
|
</data>
|
||||||
|
<data name="PleaseInput" xml:space="preserve">
|
||||||
|
<value>Please input...</value>
|
||||||
|
</data>
|
||||||
|
<data name="PleaseWait" xml:space="preserve">
|
||||||
|
<value>Please wait...</value>
|
||||||
|
</data>
|
||||||
|
<data name="PlsEnterContent" xml:space="preserve">
|
||||||
|
<value>Please enter content</value>
|
||||||
|
</data>
|
||||||
|
<data name="PlsEnterEmail" xml:space="preserve">
|
||||||
|
<value>please enter email</value>
|
||||||
|
</data>
|
||||||
|
<data name="PlsEnterKey" xml:space="preserve">
|
||||||
|
<value>Please input a keyword</value>
|
||||||
|
</data>
|
||||||
|
<data name="Poptip" xml:space="preserve">
|
||||||
|
<value>Poptip</value>
|
||||||
|
</data>
|
||||||
|
<data name="PoptipPositionStr" xml:space="preserve">
|
||||||
|
<value>top-start;top;top-end;right-start;right;right-end;bottom-end;bottom;bottom-start;left-end;left;left-start</value>
|
||||||
|
</data>
|
||||||
|
<data name="Prev" xml:space="preserve">
|
||||||
|
<value>Prev</value>
|
||||||
|
</data>
|
||||||
|
<data name="PreviewSlider" xml:space="preserve">
|
||||||
|
<value>PreviewSlider</value>
|
||||||
|
</data>
|
||||||
|
<data name="Primary" xml:space="preserve">
|
||||||
|
<value>Primary</value>
|
||||||
|
</data>
|
||||||
|
<data name="ProgressBar" xml:space="preserve">
|
||||||
|
<value>ProgressBar</value>
|
||||||
|
</data>
|
||||||
|
<data name="ProgressButton" xml:space="preserve">
|
||||||
|
<value>ProgressButton</value>
|
||||||
|
</data>
|
||||||
|
<data name="Project" xml:space="preserve">
|
||||||
|
<value>Project</value>
|
||||||
|
</data>
|
||||||
|
<data name="PushToTalk" xml:space="preserve">
|
||||||
|
<value>Push to talk</value>
|
||||||
|
</data>
|
||||||
|
<data name="QQGroup" xml:space="preserve">
|
||||||
|
<value>QQ Group</value>
|
||||||
|
</data>
|
||||||
|
<data name="RadioButton" xml:space="preserve">
|
||||||
|
<value>RadioButton</value>
|
||||||
|
</data>
|
||||||
|
<data name="RangeSlider" xml:space="preserve">
|
||||||
|
<value>RangeSlider</value>
|
||||||
|
</data>
|
||||||
|
<data name="Rate" xml:space="preserve">
|
||||||
|
<value>Rate</value>
|
||||||
|
</data>
|
||||||
|
<data name="Recommendation" xml:space="preserve">
|
||||||
|
<value>Recommendation</value>
|
||||||
|
</data>
|
||||||
|
<data name="Register" xml:space="preserve">
|
||||||
|
<value>Register</value>
|
||||||
|
</data>
|
||||||
|
<data name="RelativePanel" xml:space="preserve">
|
||||||
|
<value>RelativePanel</value>
|
||||||
|
</data>
|
||||||
|
<data name="Remark" xml:space="preserve">
|
||||||
|
<value>Remark</value>
|
||||||
|
</data>
|
||||||
|
<data name="RemoveItem" xml:space="preserve">
|
||||||
|
<value>Remove an item</value>
|
||||||
|
</data>
|
||||||
|
<data name="RepeatButton" xml:space="preserve">
|
||||||
|
<value>RepeatButton</value>
|
||||||
|
</data>
|
||||||
|
<data name="Reply" xml:space="preserve">
|
||||||
|
<value>Reply</value>
|
||||||
|
</data>
|
||||||
|
<data name="Repository" xml:space="preserve">
|
||||||
|
<value>Repository</value>
|
||||||
|
</data>
|
||||||
|
<data name="ResponsiveLayout" xml:space="preserve">
|
||||||
|
<value>Responsive layout</value>
|
||||||
|
</data>
|
||||||
|
<data name="RichTextBox" xml:space="preserve">
|
||||||
|
<value>RichTextBox</value>
|
||||||
|
</data>
|
||||||
|
<data name="RightClickHere" xml:space="preserve">
|
||||||
|
<value>Right click here</value>
|
||||||
|
</data>
|
||||||
|
<data name="RunningBlock" xml:space="preserve">
|
||||||
|
<value>RunningBlock</value>
|
||||||
|
</data>
|
||||||
|
<data name="ScrollViewer" xml:space="preserve">
|
||||||
|
<value>ScrollViewer</value>
|
||||||
|
</data>
|
||||||
|
<data name="SearchBar" xml:space="preserve">
|
||||||
|
<value>SearchBar</value>
|
||||||
|
</data>
|
||||||
|
<data name="Second" xml:space="preserve">
|
||||||
|
<value>Sec</value>
|
||||||
|
</data>
|
||||||
|
<data name="Selected" xml:space="preserve">
|
||||||
|
<value>Selected</value>
|
||||||
|
</data>
|
||||||
|
<data name="SendNotification" xml:space="preserve">
|
||||||
|
<value>Send notification</value>
|
||||||
|
</data>
|
||||||
|
<data name="Shield" xml:space="preserve">
|
||||||
|
<value>Shield</value>
|
||||||
|
</data>
|
||||||
|
<data name="ShowInCurrentWindow" xml:space="preserve">
|
||||||
|
<value>Show in the current window</value>
|
||||||
|
</data>
|
||||||
|
<data name="ShowInMainWindow" xml:space="preserve">
|
||||||
|
<value>Show in the main window</value>
|
||||||
|
</data>
|
||||||
|
<data name="ShowRowNumber" xml:space="preserve">
|
||||||
|
<value>ShowRowNumber</value>
|
||||||
|
</data>
|
||||||
|
<data name="SideMenu" xml:space="preserve">
|
||||||
|
<value>SideMenu</value>
|
||||||
|
</data>
|
||||||
|
<data name="Slider" xml:space="preserve">
|
||||||
|
<value>Slider</value>
|
||||||
|
</data>
|
||||||
|
<data name="SplitButton" xml:space="preserve">
|
||||||
|
<value>SplitButton</value>
|
||||||
|
</data>
|
||||||
|
<data name="Sprite" xml:space="preserve">
|
||||||
|
<value>Sprite</value>
|
||||||
|
</data>
|
||||||
|
<data name="StaysOpen" xml:space="preserve">
|
||||||
|
<value>Stays open</value>
|
||||||
|
</data>
|
||||||
|
<data name="Step" xml:space="preserve">
|
||||||
|
<value>Step</value>
|
||||||
|
</data>
|
||||||
|
<data name="StepBar" xml:space="preserve">
|
||||||
|
<value>StepBar</value>
|
||||||
|
</data>
|
||||||
|
<data name="Styles" xml:space="preserve">
|
||||||
|
<value>Styles</value>
|
||||||
|
</data>
|
||||||
|
<data name="SubTitle" xml:space="preserve">
|
||||||
|
<value>Subtitle</value>
|
||||||
|
</data>
|
||||||
|
<data name="Success" xml:space="preserve">
|
||||||
|
<value>Success</value>
|
||||||
|
</data>
|
||||||
|
<data name="TabControl" xml:space="preserve">
|
||||||
|
<value>TabControl</value>
|
||||||
|
</data>
|
||||||
|
<data name="Tag" xml:space="preserve">
|
||||||
|
<value>Tag</value>
|
||||||
|
</data>
|
||||||
|
<data name="Text" xml:space="preserve">
|
||||||
|
<value>Text</value>
|
||||||
|
</data>
|
||||||
|
<data name="TextBlock" xml:space="preserve">
|
||||||
|
<value>TextBlock</value>
|
||||||
|
</data>
|
||||||
|
<data name="TextBox" xml:space="preserve">
|
||||||
|
<value>TextBox</value>
|
||||||
|
</data>
|
||||||
|
<data name="TextDialog" xml:space="preserve">
|
||||||
|
<value>TextDialog</value>
|
||||||
|
</data>
|
||||||
|
<data name="TextDialogWithTimer" xml:space="preserve">
|
||||||
|
<value>TextDialog with timer</value>
|
||||||
|
</data>
|
||||||
|
<data name="TimeBar" xml:space="preserve">
|
||||||
|
<value>TimeBar</value>
|
||||||
|
</data>
|
||||||
|
<data name="TimePicker" xml:space="preserve">
|
||||||
|
<value>TimePicker</value>
|
||||||
|
</data>
|
||||||
|
<data name="Tip" xml:space="preserve">
|
||||||
|
<value>Prompt</value>
|
||||||
|
</data>
|
||||||
|
<data name="Title" xml:space="preserve">
|
||||||
|
<value>Title</value>
|
||||||
|
</data>
|
||||||
|
<data name="TitleDemoStr1" xml:space="preserve">
|
||||||
|
<value>This is the title</value>
|
||||||
|
</data>
|
||||||
|
<data name="TitleDemoStr2" xml:space="preserve">
|
||||||
|
<value>This item must be filled in</value>
|
||||||
|
</data>
|
||||||
|
<data name="TitleDemoStr3" xml:space="preserve">
|
||||||
|
<value>The title is on the left</value>
|
||||||
|
</data>
|
||||||
|
<data name="ToggleButton" xml:space="preserve">
|
||||||
|
<value>ToggleButton</value>
|
||||||
|
</data>
|
||||||
|
<data name="ToolBar" xml:space="preserve">
|
||||||
|
<value>ToolBar</value>
|
||||||
|
</data>
|
||||||
|
<data name="Tools" xml:space="preserve">
|
||||||
|
<value>Tools</value>
|
||||||
|
</data>
|
||||||
|
<data name="Transfer" xml:space="preserve">
|
||||||
|
<value>Transfer</value>
|
||||||
|
</data>
|
||||||
|
<data name="TransitioningContentControl" xml:space="preserve">
|
||||||
|
<value>TransitioningContentControl</value>
|
||||||
|
</data>
|
||||||
|
<data name="TreeView" xml:space="preserve">
|
||||||
|
<value>TreeView</value>
|
||||||
|
</data>
|
||||||
|
<data name="Try2CloseApp" xml:space="preserve">
|
||||||
|
<value>Try to close app?</value>
|
||||||
|
</data>
|
||||||
|
<data name="Type" xml:space="preserve">
|
||||||
|
<value>Type</value>
|
||||||
|
</data>
|
||||||
|
<data name="UploadFile" xml:space="preserve">
|
||||||
|
<value>Upload file</value>
|
||||||
|
</data>
|
||||||
|
<data name="UploadStr" xml:space="preserve">
|
||||||
|
<value>Upload;Uploading</value>
|
||||||
|
</data>
|
||||||
|
<data name="Visibility" xml:space="preserve">
|
||||||
|
<value>Visibility</value>
|
||||||
|
</data>
|
||||||
|
<data name="Vsix" xml:space="preserve">
|
||||||
|
<value>Vsix</value>
|
||||||
|
</data>
|
||||||
|
<data name="Warning" xml:space="preserve">
|
||||||
|
<value>Warning</value>
|
||||||
|
</data>
|
||||||
|
<data name="WaterfallPanel" xml:space="preserve">
|
||||||
|
<value>WaterfallPanel</value>
|
||||||
|
</data>
|
||||||
|
<data name="Website" xml:space="preserve">
|
||||||
|
<value>Website</value>
|
||||||
|
</data>
|
||||||
|
<data name="Window" xml:space="preserve">
|
||||||
|
<value>Window</value>
|
||||||
|
</data>
|
||||||
|
<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>
|
||||||
@@ -711,4 +711,13 @@
|
|||||||
<data name="Demo" xml:space="preserve">
|
<data name="Demo" xml:space="preserve">
|
||||||
<value>示例</value>
|
<value>示例</value>
|
||||||
</data>
|
</data>
|
||||||
|
<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>
|
</root>
|
||||||
|
After Width: | Height: | Size: 196 B |
|
After Width: | Height: | Size: 133 B |
|
After Width: | Height: | Size: 315 B |
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
<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" 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>
|
</StackPanel>
|
||||||
</hc:TransitioningContentControl>
|
</hc:TransitioningContentControl>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -0,0 +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:hc="https://handyorg.github.io/handycontrol"
|
||||||
|
Background="{DynamicResource RegionBrush}">
|
||||||
|
<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>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using System.Windows;
|
||||||
|
using HandyControl.Controls;
|
||||||
|
|
||||||
|
namespace HandyControlDemo.UserControl
|
||||||
|
{
|
||||||
|
public partial class PinBoxDemoCtl
|
||||||
|
{
|
||||||
|
public PinBoxDemoCtl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PinBox_OnCompleted(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.OriginalSource is PinBox pinBox)
|
||||||
|
{
|
||||||
|
Growl.Info(pinBox.Password);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,14 +8,14 @@
|
|||||||
<StackPanel>
|
<StackPanel>
|
||||||
<hc:RangeSlider Width="400" IsSnapToTickEnabled="True" ValueStart="2" ValueEnd="8"/>
|
<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" 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="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="BottomRight" IsSnapToTickEnabled="True" ValueEnd="5" TickPlacement="Both" 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>
|
||||||
<StackPanel Margin="32,0,0,0" Orientation="Horizontal">
|
<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="8" Orientation="Vertical"/>
|
||||||
<hc:RangeSlider Height="400" IsSnapToTickEnabled="True" ValueEnd="3" Margin="32,0,0,0" IsEnabled="False" 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="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="BottomRight" IsSnapToTickEnabled="True" ValueEnd="5" TickPlacement="Both" Margin="32,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>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</hc:TransitioningContentControl>
|
</hc:TransitioningContentControl>
|
||||||
|
|||||||
@@ -16,6 +16,9 @@
|
|||||||
<Button Click="ButtonCustomContent_OnClick" Content="{x:Static langs:Lang.OpenCustomContentWindow}"/>
|
<Button Click="ButtonCustomContent_OnClick" Content="{x:Static langs:Lang.OpenCustomContentWindow}"/>
|
||||||
<Button Name="ButtonMouseFollow" Click="ButtonMouseFollow_OnClick" Content="{x:Static langs:Lang.OpenMouseFollowWindow}"/>
|
<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}"/>
|
<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>
|
</UniformGrid>
|
||||||
</hc:TransitioningContentControl>
|
</hc:TransitioningContentControl>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,15 +9,15 @@
|
|||||||
<Slider Width="400" IsSnapToTickEnabled="True" Value="8"/>
|
<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" 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" 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="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="BottomRight" IsSnapToTickEnabled="True" Value="5" TickPlacement="Both" 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>
|
||||||
<StackPanel Margin="32,0,0,0" Orientation="Horizontal">
|
<StackPanel Margin="32,0,0,0" Orientation="Horizontal">
|
||||||
<Slider Height="400" IsSnapToTickEnabled="True" Value="8" Orientation="Vertical"/>
|
<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" 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" 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="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="BottomRight" IsSnapToTickEnabled="True" Value="5" TickPlacement="Both" Margin="32,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>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</hc:TransitioningContentControl>
|
</hc:TransitioningContentControl>
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
ShowTitle="True"
|
ShowTitle="True"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
BorderBrush="#262e2f"
|
BorderBrush="#262e2f"
|
||||||
Style="{StaticResource WindowWin10}"
|
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
ShowInTaskbar="False"
|
ShowInTaskbar="False"
|
||||||
WindowStartupLocation="CenterOwner"
|
WindowStartupLocation="CenterOwner"
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
<hc:BlurWindow x:Class="HandyControlDemo.Window.BlurWindow"
|
<hc:BlurWindow x:Class="HandyControlDemo.Window.BlurWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
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:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Title="{x:Static langs:Lang.Title}"
|
Title="{x:Static langs:Lang.Title}"
|
||||||
Style="{StaticResource WindowBlur}"
|
Height="450"
|
||||||
Height="450"
|
Width="800"
|
||||||
Width="800"
|
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
|
||||||
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
|
|
||||||
</hc:BlurWindow>
|
</hc:BlurWindow>
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Background="{DynamicResource MainContentBackgroundBrush}"
|
Background="{DynamicResource MainContentBackgroundBrush}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Style="{StaticResource WindowWin10}"
|
|
||||||
Title="{x:Static langs:Lang.Title}"
|
Title="{x:Static langs:Lang.Title}"
|
||||||
Height="450"
|
Height="450"
|
||||||
Width="800"
|
Width="800"
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
NonClientAreaHeight="69"
|
NonClientAreaHeight="69"
|
||||||
Background="{DynamicResource MainContentBackgroundBrush}"
|
Background="{DynamicResource MainContentBackgroundBrush}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
Style="{StaticResource WindowWin10}"
|
|
||||||
ShowTitle="False"
|
ShowTitle="False"
|
||||||
Title="{x:Static langs:Lang.Title}"
|
Title="{x:Static langs:Lang.Title}"
|
||||||
Height="450"
|
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"
|
mc:Ignorable="d"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
ShowTitle="True"
|
ShowTitle="True"
|
||||||
Style="{StaticResource WindowBlur}"
|
|
||||||
Icon="/HandyControlDemo;component/Resources/Img/icon.ico"
|
Icon="/HandyControlDemo;component/Resources/Img/icon.ico"
|
||||||
ShowNonClientArea="False"
|
ShowNonClientArea="False"
|
||||||
Title="NoClientDragableWindow"
|
Title="NoClientDragableWindow"
|
||||||
|
|||||||
@@ -18,5 +18,14 @@ namespace HandyControl.Controls
|
|||||||
public static void SetPlacement(DependencyObject element, TipPlacement value) => element.SetValue(PlacementProperty, value);
|
public static void SetPlacement(DependencyObject element, TipPlacement value) => element.SetValue(PlacementProperty, value);
|
||||||
|
|
||||||
public static TipPlacement GetPlacement(DependencyObject element) => (TipPlacement) element.GetValue(PlacementProperty);
|
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)
|
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)
|
public static Color GetColorAt(int x, int y)
|
||||||
{
|
{
|
||||||
var desk = UnsafeNativeMethods.GetDesktopWindow();
|
var desk = InteropMethods.GetDesktopWindow();
|
||||||
var dc = UnsafeNativeMethods.GetWindowDC(desk);
|
var dc = InteropMethods.GetWindowDC(desk);
|
||||||
var a = (int)UnsafeNativeMethods.GetPixel(dc, x, y);
|
var a = (int)InteropMethods.GetPixel(dc, x, y);
|
||||||
UnsafeNativeMethods.ReleaseDC(desk, dc);
|
InteropMethods.ReleaseDC(desk, dc);
|
||||||
return Color.FromArgb(255, (byte) ((a >> 0) & 0xff), (byte) ((a >> 8) & 0xff), (byte) ((a >> 16) & 0xff));
|
return Color.FromArgb(255, (byte) ((a >> 0) & 0xff), (byte) ((a >> 8) & 0xff), (byte) ((a >> 16) & 0xff));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -321,10 +321,8 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (ActionBeforeClose != null)
|
if (Type == InfoType.Ask)
|
||||||
{
|
{
|
||||||
_staysOpen = true;
|
|
||||||
_showCloseButton = false;
|
|
||||||
_panelMore.IsEnabled = true;
|
_panelMore.IsEnabled = true;
|
||||||
_panelMore.Show();
|
_panelMore.Show();
|
||||||
}
|
}
|
||||||
@@ -534,12 +532,12 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case InfoType.Ask:
|
case InfoType.Ask:
|
||||||
|
growlInfo.StaysOpen = true;
|
||||||
|
growlInfo.ShowCloseButton = false;
|
||||||
if (!growlInfo.IsCustom)
|
if (!growlInfo.IsCustom)
|
||||||
{
|
{
|
||||||
growlInfo.IconKey = ResourceToken.AskGeometry;
|
growlInfo.IconKey = ResourceToken.AskGeometry;
|
||||||
growlInfo.IconBrushKey = ResourceToken.AccentBrush;
|
growlInfo.IconBrushKey = ResourceToken.AccentBrush;
|
||||||
growlInfo.StaysOpen = true;
|
|
||||||
growlInfo.ShowCloseButton = false;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -805,7 +803,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (invokeActionBeforeClose)
|
if (invokeActionBeforeClose)
|
||||||
{
|
{
|
||||||
ActionBeforeClose?.Invoke(invokeParam);
|
if (ActionBeforeClose?.Invoke(invokeParam) == false) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_timerClose?.Stop();
|
_timerClose?.Stop();
|
||||||
|
|||||||
@@ -60,8 +60,6 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private SecureString _password;
|
private SecureString _password;
|
||||||
|
|
||||||
private char _passwordChar;
|
|
||||||
|
|
||||||
private System.Windows.Controls.TextBox _textBox;
|
private System.Windows.Controls.TextBox _textBox;
|
||||||
|
|
||||||
public PasswordBox()
|
public PasswordBox()
|
||||||
@@ -223,12 +221,6 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_passwordChar != default(char))
|
|
||||||
{
|
|
||||||
ActualPasswordBox.PasswordChar = _passwordChar;
|
|
||||||
_passwordChar = default;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_textBox != null)
|
if (_textBox != null)
|
||||||
|
|||||||
@@ -0,0 +1,339 @@
|
|||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -33,7 +33,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private IconHandle _iconHandle;
|
private IconHandle _iconHandle;
|
||||||
|
|
||||||
private const int WmTrayMouseMessage = NativeMethods.WM_USER + 1024;
|
private const int WmTrayMouseMessage = InteropValues.WM_USER + 1024;
|
||||||
|
|
||||||
private string _windowClassName;
|
private string _windowClassName;
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private IntPtr _messageWindowHandle;
|
private IntPtr _messageWindowHandle;
|
||||||
|
|
||||||
private readonly WndProc _callback;
|
private readonly InteropValues.WndProc _callback;
|
||||||
|
|
||||||
private Popup _contextContent;
|
private Popup _contextContent;
|
||||||
|
|
||||||
@@ -165,9 +165,9 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (!_added || DesignerHelper.IsInDesignMode) return;
|
if (!_added || DesignerHelper.IsInDesignMode) return;
|
||||||
|
|
||||||
var data = new NOTIFYICONDATA
|
var data = new InteropValues.NOTIFYICONDATA
|
||||||
{
|
{
|
||||||
uFlags = NativeMethods.NIF_INFO,
|
uFlags = InteropValues.NIF_INFO,
|
||||||
hWnd = _messageWindowHandle,
|
hWnd = _messageWindowHandle,
|
||||||
uID = _id,
|
uID = _id,
|
||||||
szInfoTitle = title ?? string.Empty,
|
szInfoTitle = title ?? string.Empty,
|
||||||
@@ -177,20 +177,20 @@ namespace HandyControl.Controls
|
|||||||
switch (infoType)
|
switch (infoType)
|
||||||
{
|
{
|
||||||
case NotifyIconInfoType.Info:
|
case NotifyIconInfoType.Info:
|
||||||
data.dwInfoFlags = NativeMethods.NIIF_INFO;
|
data.dwInfoFlags = InteropValues.NIIF_INFO;
|
||||||
break;
|
break;
|
||||||
case NotifyIconInfoType.Warning:
|
case NotifyIconInfoType.Warning:
|
||||||
data.dwInfoFlags = NativeMethods.NIIF_WARNING;
|
data.dwInfoFlags = InteropValues.NIIF_WARNING;
|
||||||
break;
|
break;
|
||||||
case NotifyIconInfoType.Error:
|
case NotifyIconInfoType.Error:
|
||||||
data.dwInfoFlags = NativeMethods.NIIF_ERROR;
|
data.dwInfoFlags = InteropValues.NIIF_ERROR;
|
||||||
break;
|
break;
|
||||||
case NotifyIconInfoType.None:
|
case NotifyIconInfoType.None:
|
||||||
data.dwInfoFlags = NativeMethods.NIIF_NONE;
|
data.dwInfoFlags = InteropValues.NIIF_NONE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
UnsafeNativeMethods.Shell_NotifyIcon(NativeMethods.NIM_MODIFY, data);
|
InteropMethods.Shell_NotifyIcon(InteropValues.NIM_MODIFY, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
@@ -330,7 +330,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
var isTrue = FindNotifyIcon(out var rectNotify);
|
var isTrue = FindNotifyIcon(out var rectNotify);
|
||||||
if (!isTrue) return false;
|
if (!isTrue) return false;
|
||||||
NativeMethods.GetCursorPos(out var point);
|
InteropMethods.GetCursorPos(out var point);
|
||||||
if (point.X >= rectNotify.Left && point.X <= rectNotify.Right &&
|
if (point.X >= rectNotify.Left && point.X <= rectNotify.Right &&
|
||||||
point.Y >= rectNotify.Top && point.Y <= rectNotify.Bottom)
|
point.Y >= rectNotify.Top && point.Y <= rectNotify.Bottom)
|
||||||
{
|
{
|
||||||
@@ -368,17 +368,17 @@ namespace HandyControl.Controls
|
|||||||
//referenced from http://www.cnblogs.com/sczmzx/p/5158127.html
|
//referenced from http://www.cnblogs.com/sczmzx/p/5158127.html
|
||||||
private IntPtr FindTrayToolbarWindow()
|
private IntPtr FindTrayToolbarWindow()
|
||||||
{
|
{
|
||||||
var hWnd = NativeMethods.FindWindow("Shell_TrayWnd", null);
|
var hWnd = InteropMethods.FindWindow("Shell_TrayWnd", null);
|
||||||
if (hWnd != IntPtr.Zero)
|
if (hWnd != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
hWnd = NativeMethods.FindWindowEx(hWnd, IntPtr.Zero, "TrayNotifyWnd", null);
|
hWnd = InteropMethods.FindWindowEx(hWnd, IntPtr.Zero, "TrayNotifyWnd", null);
|
||||||
if (hWnd != IntPtr.Zero)
|
if (hWnd != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
|
|
||||||
hWnd = NativeMethods.FindWindowEx(hWnd, IntPtr.Zero, "SysPager", null);
|
hWnd = InteropMethods.FindWindowEx(hWnd, IntPtr.Zero, "SysPager", null);
|
||||||
if (hWnd != IntPtr.Zero)
|
if (hWnd != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
hWnd = NativeMethods.FindWindowEx(hWnd, IntPtr.Zero, "ToolbarWindow32", null);
|
hWnd = InteropMethods.FindWindowEx(hWnd, IntPtr.Zero, "ToolbarWindow32", null);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -389,17 +389,17 @@ namespace HandyControl.Controls
|
|||||||
//referenced from http://www.cnblogs.com/sczmzx/p/5158127.html
|
//referenced from http://www.cnblogs.com/sczmzx/p/5158127.html
|
||||||
private IntPtr FindTrayToolbarOverFlowWindow()
|
private IntPtr FindTrayToolbarOverFlowWindow()
|
||||||
{
|
{
|
||||||
var hWnd = NativeMethods.FindWindow("NotifyIconOverflowWindow", null);
|
var hWnd = InteropMethods.FindWindow("NotifyIconOverflowWindow", null);
|
||||||
if (hWnd != IntPtr.Zero)
|
if (hWnd != IntPtr.Zero)
|
||||||
{
|
{
|
||||||
hWnd = NativeMethods.FindWindowEx(hWnd, IntPtr.Zero, "ToolbarWindow32", null);
|
hWnd = InteropMethods.FindWindowEx(hWnd, IntPtr.Zero, "ToolbarWindow32", null);
|
||||||
}
|
}
|
||||||
return hWnd;
|
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 hTrayWnd = FindTrayToolbarWindow();
|
||||||
var isTrue = FindNotifyIcon(hTrayWnd, ref rectNotify);
|
var isTrue = FindNotifyIcon(hTrayWnd, ref rectNotify);
|
||||||
if (!isTrue)
|
if (!isTrue)
|
||||||
@@ -412,48 +412,48 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
//referenced from http://www.cnblogs.com/sczmzx/p/5158127.html
|
//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);
|
InteropMethods.GetWindowRect(hTrayWnd, out var rectTray);
|
||||||
var count = (int)NativeMethods.SendMessage(hTrayWnd, NativeMethods.TB_BUTTONCOUNT, 0, IntPtr.Zero);
|
var count = (int)InteropMethods.SendMessage(hTrayWnd, InteropValues.TB_BUTTONCOUNT, 0, IntPtr.Zero);
|
||||||
|
|
||||||
var isFind = false;
|
var isFind = false;
|
||||||
if (count > 0)
|
if (count > 0)
|
||||||
{
|
{
|
||||||
NativeMethods.GetWindowThreadProcessId(hTrayWnd, out var trayPid);
|
InteropMethods.GetWindowThreadProcessId(hTrayWnd, out var trayPid);
|
||||||
var hProcess = NativeMethods.OpenProcess(NativeMethods.ProcessAccess.VMOperation | NativeMethods.ProcessAccess.VMRead | NativeMethods.ProcessAccess.VMWrite, false, trayPid);
|
var hProcess = InteropMethods.OpenProcess(InteropValues.ProcessAccess.VMOperation | InteropValues.ProcessAccess.VMRead | InteropValues.ProcessAccess.VMWrite, false, trayPid);
|
||||||
var address = NativeMethods.VirtualAllocEx(hProcess, IntPtr.Zero, 1024, NativeMethods.AllocationType.Commit, NativeMethods.MemoryProtection.ReadWrite);
|
var address = InteropMethods.VirtualAllocEx(hProcess, IntPtr.Zero, 1024, InteropValues.AllocationType.Commit, InteropValues.MemoryProtection.ReadWrite);
|
||||||
|
|
||||||
var btnData = new NativeMethods.TBBUTTON();
|
var btnData = new InteropValues.TBBUTTON();
|
||||||
var trayData = new NativeMethods.TRAYDATA();
|
var trayData = new InteropValues.TRAYDATA();
|
||||||
var handel = Process.GetCurrentProcess().Id;
|
var handel = Process.GetCurrentProcess().Id;
|
||||||
|
|
||||||
for (uint i = 0; i < count; i++)
|
for (uint i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
NativeMethods.SendMessage(hTrayWnd, NativeMethods.TB_GETBUTTON, i, address);
|
InteropMethods.SendMessage(hTrayWnd, InteropValues.TB_GETBUTTON, i, address);
|
||||||
var isTrue = NativeMethods.ReadProcessMemory(hProcess, address, out btnData, Marshal.SizeOf(btnData), out _);
|
var isTrue = InteropMethods.ReadProcessMemory(hProcess, address, out btnData, Marshal.SizeOf(btnData), out _);
|
||||||
if (!isTrue) continue;
|
if (!isTrue) continue;
|
||||||
if (btnData.dwData == IntPtr.Zero)
|
if (btnData.dwData == IntPtr.Zero)
|
||||||
{
|
{
|
||||||
btnData.dwData = btnData.iString;
|
btnData.dwData = btnData.iString;
|
||||||
}
|
}
|
||||||
NativeMethods.ReadProcessMemory(hProcess, btnData.dwData, out trayData, Marshal.SizeOf(trayData), out _);
|
InteropMethods.ReadProcessMemory(hProcess, btnData.dwData, out trayData, Marshal.SizeOf(trayData), out _);
|
||||||
NativeMethods.GetWindowThreadProcessId(trayData.hwnd, out var dwProcessId);
|
InteropMethods.GetWindowThreadProcessId(trayData.hwnd, out var dwProcessId);
|
||||||
if (dwProcessId == (uint)handel)
|
if (dwProcessId == (uint)handel)
|
||||||
{
|
{
|
||||||
var rect = new NativeMethods.RECT();
|
var rect = new InteropValues.RECT();
|
||||||
var lngRect = NativeMethods.VirtualAllocEx(hProcess, IntPtr.Zero, Marshal.SizeOf(typeof(Rect)), NativeMethods.AllocationType.Commit, NativeMethods.MemoryProtection.ReadWrite);
|
var lngRect = InteropMethods.VirtualAllocEx(hProcess, IntPtr.Zero, Marshal.SizeOf(typeof(Rect)), InteropValues.AllocationType.Commit, InteropValues.MemoryProtection.ReadWrite);
|
||||||
NativeMethods.SendMessage(hTrayWnd, NativeMethods.TB_GETITEMRECT, i, lngRect);
|
InteropMethods.SendMessage(hTrayWnd, InteropValues.TB_GETITEMRECT, i, lngRect);
|
||||||
NativeMethods.ReadProcessMemory(hProcess, lngRect, out rect, Marshal.SizeOf(rect), out _);
|
InteropMethods.ReadProcessMemory(hProcess, lngRect, out rect, Marshal.SizeOf(rect), out _);
|
||||||
|
|
||||||
NativeMethods.VirtualFreeEx(hProcess, lngRect, Marshal.SizeOf(rect), NativeMethods.FreeType.Decommit);
|
InteropMethods.VirtualFreeEx(hProcess, lngRect, Marshal.SizeOf(rect), InteropValues.FreeType.Decommit);
|
||||||
NativeMethods.VirtualFreeEx(hProcess, lngRect, 0, NativeMethods.FreeType.Release);
|
InteropMethods.VirtualFreeEx(hProcess, lngRect, 0, InteropValues.FreeType.Release);
|
||||||
|
|
||||||
var left = rectTray.Left + rect.Left;
|
var left = rectTray.Left + rect.Left;
|
||||||
var top = rectTray.Top + rect.Top;
|
var top = rectTray.Top + rect.Top;
|
||||||
var botton = rectTray.Top + rect.Bottom;
|
var botton = rectTray.Top + rect.Bottom;
|
||||||
var right = rectTray.Left + rect.Right;
|
var right = rectTray.Left + rect.Right;
|
||||||
rectNotify = new NativeMethods.RECT
|
rectNotify = new InteropValues.RECT
|
||||||
{
|
{
|
||||||
Left = left,
|
Left = left,
|
||||||
Right = right,
|
Right = right,
|
||||||
@@ -464,9 +464,9 @@ namespace HandyControl.Controls
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
NativeMethods.VirtualFreeEx(hProcess, address, 0x4096, NativeMethods.FreeType.Decommit);
|
InteropMethods.VirtualFreeEx(hProcess, address, 0x4096, InteropValues.FreeType.Decommit);
|
||||||
NativeMethods.VirtualFreeEx(hProcess, address, 0, NativeMethods.FreeType.Release);
|
InteropMethods.VirtualFreeEx(hProcess, address, 0, InteropValues.FreeType.Release);
|
||||||
NativeMethods.CloseHandle(hProcess);
|
InteropMethods.CloseHandle(hProcess);
|
||||||
}
|
}
|
||||||
return isFind;
|
return isFind;
|
||||||
}
|
}
|
||||||
@@ -496,13 +496,13 @@ namespace HandyControl.Controls
|
|||||||
if (DesignerHelper.IsInDesignMode) return;
|
if (DesignerHelper.IsInDesignMode) return;
|
||||||
|
|
||||||
_isTransparent = isTransparent;
|
_isTransparent = isTransparent;
|
||||||
var data = new NOTIFYICONDATA
|
var data = new InteropValues.NOTIFYICONDATA
|
||||||
{
|
{
|
||||||
uCallbackMessage = WmTrayMouseMessage,
|
uCallbackMessage = WmTrayMouseMessage,
|
||||||
uFlags = NativeMethods.NIF_MESSAGE | NativeMethods.NIF_ICON | NativeMethods.NIF_TIP,
|
uFlags = InteropValues.NIF_MESSAGE | InteropValues.NIF_ICON | InteropValues.NIF_TIP,
|
||||||
hWnd = _messageWindowHandle,
|
hWnd = _messageWindowHandle,
|
||||||
uID = _id,
|
uID = _id,
|
||||||
dwInfoFlags = NativeMethods.NIF_TIP,
|
dwInfoFlags = InteropValues.NIF_TIP,
|
||||||
hIcon = isTransparent ? IntPtr.Zero : _iconCurrentHandle,
|
hIcon = isTransparent ? IntPtr.Zero : _iconCurrentHandle,
|
||||||
szTip = Text
|
szTip = Text
|
||||||
};
|
};
|
||||||
@@ -511,17 +511,17 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
if (!_added)
|
if (!_added)
|
||||||
{
|
{
|
||||||
UnsafeNativeMethods.Shell_NotifyIcon(NativeMethods.NIM_ADD, data);
|
InteropMethods.Shell_NotifyIcon(InteropValues.NIM_ADD, data);
|
||||||
_added = true;
|
_added = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UnsafeNativeMethods.Shell_NotifyIcon(NativeMethods.NIM_MODIFY, data);
|
InteropMethods.Shell_NotifyIcon(InteropValues.NIM_MODIFY, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_added)
|
else if (_added)
|
||||||
{
|
{
|
||||||
UnsafeNativeMethods.Shell_NotifyIcon(NativeMethods.NIM_DELETE, data);
|
InteropMethods.Shell_NotifyIcon(InteropValues.NIM_DELETE, data);
|
||||||
_added = false;
|
_added = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -530,7 +530,7 @@ namespace HandyControl.Controls
|
|||||||
private void RegisterClass()
|
private void RegisterClass()
|
||||||
{
|
{
|
||||||
_windowClassName = $"HandyControl.Controls.NotifyIcon{Guid.NewGuid()}";
|
_windowClassName = $"HandyControl.Controls.NotifyIcon{Guid.NewGuid()}";
|
||||||
var wndclass = new WNDCLASS
|
var wndclass = new InteropValues.WNDCLASS
|
||||||
{
|
{
|
||||||
style = 0,
|
style = 0,
|
||||||
lpfnWndProc = _callback,
|
lpfnWndProc = _callback,
|
||||||
@@ -544,9 +544,9 @@ namespace HandyControl.Controls
|
|||||||
lpszClassName = _windowClassName
|
lpszClassName = _windowClassName
|
||||||
};
|
};
|
||||||
|
|
||||||
UnsafeNativeMethods.RegisterClass(wndclass);
|
InteropMethods.RegisterClass(wndclass);
|
||||||
_wmTaskbarCreated = NativeMethods.RegisterWindowMessage("TaskbarCreated");
|
_wmTaskbarCreated = InteropMethods.RegisterWindowMessage("TaskbarCreated");
|
||||||
_messageWindowHandle = UnsafeNativeMethods.CreateWindowEx(0, _windowClassName, "", 0, 0, 0, 1, 1,
|
_messageWindowHandle = InteropMethods.CreateWindowEx(0, _windowClassName, "", 0, 0, 0, 1, 1,
|
||||||
IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
|
IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -562,17 +562,17 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
switch (lparam.ToInt64())
|
switch (lparam.ToInt64())
|
||||||
{
|
{
|
||||||
case NativeMethods.WM_LBUTTONDBLCLK:
|
case InteropValues.WM_LBUTTONDBLCLK:
|
||||||
WmMouseDown(MouseButton.Left, 2);
|
WmMouseDown(MouseButton.Left, 2);
|
||||||
break;
|
break;
|
||||||
case NativeMethods.WM_LBUTTONUP:
|
case InteropValues.WM_LBUTTONUP:
|
||||||
WmMouseUp(MouseButton.Left);
|
WmMouseUp(MouseButton.Left);
|
||||||
break;
|
break;
|
||||||
case NativeMethods.WM_RBUTTONUP:
|
case InteropValues.WM_RBUTTONUP:
|
||||||
ShowContextMenu();
|
ShowContextMenu();
|
||||||
WmMouseUp(MouseButton.Right);
|
WmMouseUp(MouseButton.Right);
|
||||||
break;
|
break;
|
||||||
case NativeMethods.WM_MOUSEMOVE:
|
case InteropValues.WM_MOUSEMOVE:
|
||||||
if (!_dispatcherTimerPos.IsEnabled)
|
if (!_dispatcherTimerPos.IsEnabled)
|
||||||
{
|
{
|
||||||
_dispatcherTimerPos.Interval = TimeSpan.FromMilliseconds(200);
|
_dispatcherTimerPos.Interval = TimeSpan.FromMilliseconds(200);
|
||||||
@@ -583,7 +583,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)
|
private void WmMouseDown(MouseButton button, int clicks)
|
||||||
@@ -632,7 +632,7 @@ namespace HandyControl.Controls
|
|||||||
Content = ContextContent
|
Content = ContextContent
|
||||||
};
|
};
|
||||||
_contextContent.IsOpen = true;
|
_contextContent.IsOpen = true;
|
||||||
UnsafeNativeMethods.SetForegroundWindow(_contextContent.Child.GetHandle());
|
InteropMethods.SetForegroundWindow(_contextContent.Child.GetHandle());
|
||||||
}
|
}
|
||||||
else if (ContextMenu != null)
|
else if (ContextMenu != null)
|
||||||
{
|
{
|
||||||
@@ -655,7 +655,7 @@ namespace HandyControl.Controls
|
|||||||
ContextMenu.Placement = PlacementMode.Mouse;
|
ContextMenu.Placement = PlacementMode.Mouse;
|
||||||
ContextMenu.IsOpen = true;
|
ContextMenu.IsOpen = true;
|
||||||
|
|
||||||
UnsafeNativeMethods.SetForegroundWindow(ContextMenu.GetHandle());
|
InteropMethods.SetForegroundWindow(ContextMenu.GetHandle());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -224,11 +224,7 @@ namespace HandyControl.Controls
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsTabFillEnabled)
|
UpdateOverflowButton();
|
||||||
{
|
|
||||||
_itemShowCount = (int)(ActualWidth / TabItemWidth);
|
|
||||||
_buttonOverflow?.Show(ShowOverflowButton && Items.Count > 0 && Items.Count >= _itemShowCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IsInternalAction)
|
if (IsInternalAction)
|
||||||
{
|
{
|
||||||
@@ -292,15 +288,6 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
if (_buttonOverflow != null)
|
if (_buttonOverflow != null)
|
||||||
{
|
{
|
||||||
if (ItemsSource != null)
|
|
||||||
{
|
|
||||||
Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
|
|
||||||
}
|
|
||||||
|
|
||||||
var size = DesiredSize;
|
|
||||||
_itemShowCount = (int)(size.Width / TabItemWidth);
|
|
||||||
_buttonOverflow.Show(ShowOverflowButton && Items.Count > 0 && Items.Count >= _itemShowCount);
|
|
||||||
|
|
||||||
var menu = new ContextMenu
|
var menu = new ContextMenu
|
||||||
{
|
{
|
||||||
Placement = PlacementMode.Bottom,
|
Placement = PlacementMode.Bottom,
|
||||||
@@ -312,6 +299,21 @@ namespace HandyControl.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
|
||||||
|
{
|
||||||
|
base.OnRenderSizeChanged(sizeInfo);
|
||||||
|
UpdateOverflowButton();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateOverflowButton()
|
||||||
|
{
|
||||||
|
if (!IsTabFillEnabled)
|
||||||
|
{
|
||||||
|
_itemShowCount = (int)(ActualWidth / TabItemWidth);
|
||||||
|
_buttonOverflow?.Show(ShowOverflowButton && Items.Count > 0 && Items.Count >= _itemShowCount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void Menu_Closed(object sender, RoutedEventArgs e) => _buttonOverflow.IsChecked = false;
|
private void Menu_Closed(object sender, RoutedEventArgs e) => _buttonOverflow.IsChecked = false;
|
||||||
|
|
||||||
private void ButtonScrollRight_Click(object sender, RoutedEventArgs e) =>
|
private void ButtonScrollRight_Click(object sender, RoutedEventArgs e) =>
|
||||||
@@ -346,7 +348,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
_buttonOverflow.IsChecked = false;
|
_buttonOverflow.IsChecked = false;
|
||||||
|
|
||||||
var list = GetActuaList();
|
var list = GetActualList();
|
||||||
if (list == null) return;
|
if (list == null) return;
|
||||||
|
|
||||||
var actualItem = ItemContainerGenerator.ItemFromContainer(item);
|
var actualItem = ItemContainerGenerator.ItemFromContainer(item);
|
||||||
@@ -391,7 +393,7 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
var actualItem = currentItem != null ? ItemContainerGenerator.ItemFromContainer(currentItem) : null;
|
var actualItem = currentItem != null ? ItemContainerGenerator.ItemFromContainer(currentItem) : null;
|
||||||
|
|
||||||
var list = GetActuaList();
|
var list = GetActualList();
|
||||||
if (list == null) return;
|
if (list == null) return;
|
||||||
|
|
||||||
IsInternalAction = true;
|
IsInternalAction = true;
|
||||||
@@ -418,7 +420,7 @@ namespace HandyControl.Controls
|
|||||||
SetCurrentValue(SelectedIndexProperty, Items.Count == 0 ? -1 : 0);
|
SetCurrentValue(SelectedIndexProperty, Items.Count == 0 ? -1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal IList GetActuaList()
|
internal IList GetActualList()
|
||||||
{
|
{
|
||||||
IList list;
|
IList list;
|
||||||
if (ItemsSource != null)
|
if (ItemsSource != null)
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ namespace HandyControl.Controls
|
|||||||
parent.IsInternalAction = true;
|
parent.IsInternalAction = true;
|
||||||
RaiseEvent(new RoutedEventArgs(ClosedEvent, item));
|
RaiseEvent(new RoutedEventArgs(ClosedEvent, item));
|
||||||
|
|
||||||
var list = parent.GetActuaList();
|
var list = parent.GetActualList();
|
||||||
list?.Remove(item);
|
list?.Remove(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,7 +392,7 @@ namespace HandyControl.Controls
|
|||||||
RenderTransform = new TranslateTransform(resultX, 0);
|
RenderTransform = new TranslateTransform(resultX, 0);
|
||||||
if (index == -1) return;
|
if (index == -1) return;
|
||||||
|
|
||||||
var list = parent.GetActuaList();
|
var list = parent.GetActualList();
|
||||||
if (list == null) return;
|
if (list == null) return;
|
||||||
|
|
||||||
var item = parent.ItemContainerGenerator.ItemFromContainer(this);
|
var item = parent.ItemContainerGenerator.ItemFromContainer(this);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Windows;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using HandyControl.Data;
|
using HandyControl.Data;
|
||||||
using HandyControl.Tools;
|
using HandyControl.Tools;
|
||||||
@@ -7,6 +8,11 @@ namespace HandyControl.Controls
|
|||||||
{
|
{
|
||||||
public class BlurWindow : Window
|
public class BlurWindow : Window
|
||||||
{
|
{
|
||||||
|
static BlurWindow()
|
||||||
|
{
|
||||||
|
StyleProperty.OverrideMetadata(typeof(BlurWindow), new FrameworkPropertyMetadata(Application.Current.FindResource(ResourceToken.WindowBlur)));
|
||||||
|
}
|
||||||
|
|
||||||
public override void OnApplyTemplate()
|
public override void OnApplyTemplate()
|
||||||
{
|
{
|
||||||
base.OnApplyTemplate();
|
base.OnApplyTemplate();
|
||||||
|
|||||||
@@ -0,0 +1,461 @@
|
|||||||
|
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 <= 71)
|
||||||
|
{
|
||||||
|
if (msg == 6)
|
||||||
|
{
|
||||||
|
return IntPtr.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (msg != 12)
|
||||||
|
{
|
||||||
|
switch (msg)
|
||||||
|
{
|
||||||
|
case 70:
|
||||||
|
WmWindowPosChanging(lParam);
|
||||||
|
return IntPtr.Zero;
|
||||||
|
case 71:
|
||||||
|
WmWindowPosChanged(lParam);
|
||||||
|
return IntPtr.Zero;
|
||||||
|
default:
|
||||||
|
return IntPtr.Zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (msg <= 166)
|
||||||
|
{
|
||||||
|
switch (msg)
|
||||||
|
{
|
||||||
|
case 128:
|
||||||
|
break;
|
||||||
|
case 129:
|
||||||
|
case 130:
|
||||||
|
return IntPtr.Zero;
|
||||||
|
case 134:
|
||||||
|
handled = true;
|
||||||
|
return WmNcActivate(hWnd, wParam);
|
||||||
|
default:
|
||||||
|
switch (msg)
|
||||||
|
{
|
||||||
|
case 164:
|
||||||
|
case 165:
|
||||||
|
case 166:
|
||||||
|
handled = true;
|
||||||
|
return IntPtr.Zero;
|
||||||
|
default:
|
||||||
|
return IntPtr.Zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch (msg)
|
||||||
|
{
|
||||||
|
case 174:
|
||||||
|
case 175:
|
||||||
|
handled = true;
|
||||||
|
return IntPtr.Zero;
|
||||||
|
default:
|
||||||
|
if (msg != 274) 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, 134, 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 == 61456)
|
||||||
|
InteropMethods.RedrawWindow(hWnd, IntPtr.Zero, IntPtr.Zero,
|
||||||
|
InteropValues.RedrawWindowFlags.Invalidate | InteropValues.RedrawWindowFlags.NoChildren |
|
||||||
|
InteropValues.RedrawWindowFlags.UpdateNow | InteropValues.RedrawWindowFlags.Frame);
|
||||||
|
if ((num == 61488 || num == 61472 || num == 61456 || num == 61440) && WindowState == WindowState.Normal &&
|
||||||
|
!IsAeroSnappedToMonitor(hWnd)) _logicalSizeForRestore = new Rect(Left, Top, Width, Height);
|
||||||
|
if (num == 61456 && WindowState == WindowState.Maximized && _logicalSizeForRestore == Rect.Empty)
|
||||||
|
_logicalSizeForRestore = new Rect(Left, Top, Width, Height);
|
||||||
|
if (num == 61728 && 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, 268435456, 0);
|
||||||
|
var result = InteropMethods.DefWindowProc(hWnd, msg, wParam, lParam);
|
||||||
|
if (flag) VisualHelper.ModifyStyle(hWnd, 0, 268435456);
|
||||||
|
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(
|
public static readonly DependencyProperty NonClientAreaHeightProperty = DependencyProperty.Register(
|
||||||
"NonClientAreaHeight", typeof(double), typeof(Window),
|
"NonClientAreaHeight", typeof(double), typeof(Window),
|
||||||
new PropertyMetadata(26.0));
|
new PropertyMetadata(22.0));
|
||||||
|
|
||||||
public static readonly DependencyProperty ShowNonClientAreaProperty = DependencyProperty.Register(
|
public static readonly DependencyProperty ShowNonClientAreaProperty = DependencyProperty.Register(
|
||||||
"ShowNonClientArea", typeof(bool), typeof(Window),
|
"ShowNonClientArea", typeof(bool), typeof(Window),
|
||||||
@@ -80,8 +80,6 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private Thickness _actualBorderThickness;
|
private Thickness _actualBorderThickness;
|
||||||
|
|
||||||
private UIElement _nonClientArea;
|
|
||||||
|
|
||||||
private bool _showNonClientArea = true;
|
private bool _showNonClientArea = true;
|
||||||
|
|
||||||
private double _tempNonClientAreaHeight;
|
private double _tempNonClientAreaHeight;
|
||||||
@@ -92,6 +90,13 @@ namespace HandyControl.Controls
|
|||||||
|
|
||||||
private ResizeMode _tempResizeMode;
|
private ResizeMode _tempResizeMode;
|
||||||
|
|
||||||
|
private UIElement _nonClientArea;
|
||||||
|
|
||||||
|
static Window()
|
||||||
|
{
|
||||||
|
StyleProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(Application.Current.FindResource(ResourceToken.WindowWin10)));
|
||||||
|
}
|
||||||
|
|
||||||
public Window()
|
public Window()
|
||||||
{
|
{
|
||||||
#if netle40
|
#if netle40
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ namespace HandyControl.Data
|
|||||||
{
|
{
|
||||||
public MouseHookMessageType Message { get; set; }
|
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,113 @@
|
|||||||
|
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);
|
||||||
|
|
||||||
|
_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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 WindowWin10 = nameof(WindowWin10);
|
||||||
|
|
||||||
|
internal const string WindowBlur = nameof(WindowBlur);
|
||||||
|
|
||||||
|
internal const string WindowGlow = nameof(WindowGlow);
|
||||||
|
|
||||||
internal const string AddTagButtonStyle = nameof(AddTagButtonStyle);
|
internal const string AddTagButtonStyle = nameof(AddTagButtonStyle);
|
||||||
|
|
||||||
internal const string RadioGroupItemDefault = nameof(RadioGroupItemDefault);
|
internal const string RadioGroupItemDefault = nameof(RadioGroupItemDefault);
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Button\SplitButton.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Button\SplitButton.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Growl\GrowlWindow.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Growl\GrowlWindow.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Image\ImageBlock.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Image\ImageBlock.cs" />
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Input\PinBox.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Divider.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Divider.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Drawer.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Drawer.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Magnifier.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Magnifier.cs" />
|
||||||
@@ -40,6 +41,8 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeThumb.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeThumb.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\TwoWayRangeBase.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\TwoWayRangeBase.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Block\RunningBlock.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\DrawerShowMode.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\HatchStyle.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\HatchStyle.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\HitMode.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\HitMode.cs" />
|
||||||
@@ -47,6 +50,12 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\NotifyIconInfoType.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\NotifyIconInfoType.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\StrokePosition.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\StrokePosition.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\TransitionMode.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\CloseWindowCommand.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\Commands\OpenLinkCommand.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\Commands\OpenLinkCommand.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Media\Animation\DiscreteGeometryKeyFrame.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Media\Animation\DiscreteGeometryKeyFrame.cs" />
|
||||||
@@ -69,6 +78,7 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\Number2PercentageConverter.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\Number2PercentageConverter.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\RectangleCircularConverter.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\RectangleCircularConverter.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\ThicknessSplitConverter.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\FrameworkElementExtension.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\StringExtension.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\StringExtension.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\ValueExtension.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\ValueExtension.cs" />
|
||||||
@@ -298,6 +308,7 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\ExternDllHelper.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\ExternDllHelper.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\IconHelper.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\IconHelper.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\ResourceHelper.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\SecurityHelper.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\SingleOpenHelper.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\SingleOpenHelper.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\TokenizerHelper.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Helper\TokenizerHelper.cs" />
|
||||||
@@ -308,20 +319,14 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Hook\KeyboardHook.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Hook\KeyboardHook.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Hook\MouseHook.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Hook\MouseHook.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Hook\SystemMenuHook.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Hook\SystemMenuHook.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\BitmapHandle.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\BitmapHandle.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\BITMAPINFO.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\CommonHandles.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\CommonHandles.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\HandleCollector.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\ExternDll.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\IconHandle.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\HandleCollector.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\InteropMethods.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\IconHandle.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\InteropValues.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\ICONINFO.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\SafeFileMappingHandle.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\NativeMethods.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\WpfSafeHandle.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)Interactivity\MouseDragElementBehaviorEx.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\MouseDragElementBehaviorEx.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Pool\IPool!1.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Pool\IPool!1.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Pool\SimplePool!1.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Pool\SimplePool!1.cs" />
|
||||||
@@ -393,6 +398,34 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</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>
|
||||||
|
</Page>
|
||||||
|
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Base\PinBoxBaseStyle.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Drawer.xaml">
|
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Drawer.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -914,4 +947,7 @@
|
|||||||
<None Include="$(MSBuildThisFileDirectory)Resources\Effects\ColorComplementEffect.fx" />
|
<None Include="$(MSBuildThisFileDirectory)Resources\Effects\ColorComplementEffect.fx" />
|
||||||
<None Include="$(MSBuildThisFileDirectory)Resources\Effects\GrayScaleEffect.fx" />
|
<None Include="$(MSBuildThisFileDirectory)Resources\Effects\GrayScaleEffect.fx" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="$(MSBuildThisFileDirectory)Tools\Interop\Handle\" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -18,7 +18,7 @@ namespace HandyControl.Interactivity
|
|||||||
var hwndSource = (HwndSource)PresentationSource.FromDependencyObject(Application.Current.MainWindow);
|
var hwndSource = (HwndSource)PresentationSource.FromDependencyObject(Application.Current.MainWindow);
|
||||||
if (hwndSource != null)
|
if (hwndSource != null)
|
||||||
{
|
{
|
||||||
UnsafeNativeMethods.SetForegroundWindow(hwndSource.Handle);
|
InteropMethods.SetForegroundWindow(hwndSource.Handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("HandyControl")]
|
[assembly: AssemblyProduct("HandyControl")]
|
||||||
[assembly: AssemblyCopyright("Copyright © HandyOrg 2018-2019")]
|
[assembly: AssemblyCopyright("Copyright © HandyOrg 2018-2020")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ namespace HandyControl.Properties.Langs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 错误的图片路径! 的本地化字符串。
|
/// 查找类似 错误的图片路径 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ErrorImgPath {
|
public static string ErrorImgPath {
|
||||||
get {
|
get {
|
||||||
@@ -151,7 +151,7 @@ namespace HandyControl.Properties.Langs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 非法的图片尺寸! 的本地化字符串。
|
/// 查找类似 非法的图片尺寸 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string ErrorImgSize {
|
public static string ErrorImgSize {
|
||||||
get {
|
get {
|
||||||
@@ -320,5 +320,23 @@ namespace HandyControl.Properties.Langs {
|
|||||||
return ResourceManager.GetString("Yes", resourceCulture);
|
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">
|
<data name="No" xml:space="preserve">
|
||||||
<value>No</value>
|
<value>No</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ZoomIn" xml:space="preserve">
|
||||||
|
<value>Zoom in</value>
|
||||||
|
</data>
|
||||||
|
<data name="ZoomOut" xml:space="preserve">
|
||||||
|
<value>Zoom out</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -184,4 +184,10 @@
|
|||||||
<data name="No" xml:space="preserve">
|
<data name="No" xml:space="preserve">
|
||||||
<value>خیر</value>
|
<value>خیر</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ZoomIn" xml:space="preserve">
|
||||||
|
<value>Zoom in</value>
|
||||||
|
</data>
|
||||||
|
<data name="ZoomOut" xml:space="preserve">
|
||||||
|
<value>Zoom out</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -204,4 +204,10 @@
|
|||||||
<data name="No" xml:space="preserve">
|
<data name="No" xml:space="preserve">
|
||||||
<value>Non</value>
|
<value>Non</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ZoomIn" xml:space="preserve">
|
||||||
|
<value>Zoom in</value>
|
||||||
|
</data>
|
||||||
|
<data name="ZoomOut" xml:space="preserve">
|
||||||
|
<value>Zoom out</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -0,0 +1,213 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<data name="Am" xml:space="preserve">
|
||||||
|
<value>오전</value>
|
||||||
|
</data>
|
||||||
|
<data name="Cancel" xml:space="preserve">
|
||||||
|
<value>취소</value>
|
||||||
|
</data>
|
||||||
|
<data name="CannotRegisterCompositeCommandInItself" xml:space="preserve">
|
||||||
|
<value>여러 명령어 자체를 등록할 수 없습니다</value>
|
||||||
|
</data>
|
||||||
|
<data name="CannotRegisterSameCommandTwice" xml:space="preserve">
|
||||||
|
<value>같은 명령어를 2번 등록할 수 없습니다</value>
|
||||||
|
</data>
|
||||||
|
<data name="Clear" xml:space="preserve">
|
||||||
|
<value>삭제</value>
|
||||||
|
</data>
|
||||||
|
<data name="Close" xml:space="preserve">
|
||||||
|
<value>닫기</value>
|
||||||
|
</data>
|
||||||
|
<data name="CloseAll" xml:space="preserve">
|
||||||
|
<value>모두 닫기</value>
|
||||||
|
</data>
|
||||||
|
<data name="CloseOther" xml:space="preserve">
|
||||||
|
<value>다른 창 모두 닫기</value>
|
||||||
|
</data>
|
||||||
|
<data name="Confirm" xml:space="preserve">
|
||||||
|
<value>확인</value>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorImgPath" xml:space="preserve">
|
||||||
|
<value>잘못된 사진 경로</value>
|
||||||
|
</data>
|
||||||
|
<data name="ErrorImgSize" xml:space="preserve">
|
||||||
|
<value>잘못된 사진 크기</value>
|
||||||
|
</data>
|
||||||
|
<data name="FormatError" xml:space="preserve">
|
||||||
|
<value>형식 오류</value>
|
||||||
|
</data>
|
||||||
|
<data name="Interval10m" xml:space="preserve">
|
||||||
|
<value>10분 간격</value>
|
||||||
|
</data>
|
||||||
|
<data name="Interval1h" xml:space="preserve">
|
||||||
|
<value>1시간 간격</value>
|
||||||
|
</data>
|
||||||
|
<data name="Interval1m" xml:space="preserve">
|
||||||
|
<value>1분 간격</value>
|
||||||
|
</data>
|
||||||
|
<data name="Interval2h" xml:space="preserve">
|
||||||
|
<value>2시간 간격</value>
|
||||||
|
</data>
|
||||||
|
<data name="Interval30m" xml:space="preserve">
|
||||||
|
<value>30분 간격</value>
|
||||||
|
</data>
|
||||||
|
<data name="Interval30s" xml:space="preserve">
|
||||||
|
<value>30초 간격</value>
|
||||||
|
</data>
|
||||||
|
<data name="Interval5m" xml:space="preserve">
|
||||||
|
<value>5분 간격</value>
|
||||||
|
</data>
|
||||||
|
<data name="IsNecessary" xml:space="preserve">
|
||||||
|
<value>이 칸은 비워둘 수 없습니다</value>
|
||||||
|
</data>
|
||||||
|
<data name="No" xml:space="preserve">
|
||||||
|
<value>아니요</value>
|
||||||
|
</data>
|
||||||
|
<data name="OutOfRange" xml:space="preserve">
|
||||||
|
<value>범위를 벗어났습니다</value>
|
||||||
|
</data>
|
||||||
|
<data name="Pm" xml:space="preserve">
|
||||||
|
<value>오후</value>
|
||||||
|
</data>
|
||||||
|
<data name="PngImg" xml:space="preserve">
|
||||||
|
<value>PNG 사진</value>
|
||||||
|
</data>
|
||||||
|
<data name="Tip" xml:space="preserve">
|
||||||
|
<value>출력</value>
|
||||||
|
</data>
|
||||||
|
<data name="TooLarge" xml:space="preserve">
|
||||||
|
<value>너무 큽니다</value>
|
||||||
|
</data>
|
||||||
|
<data name="Unknown" xml:space="preserve">
|
||||||
|
<value>알 수 없음</value>
|
||||||
|
</data>
|
||||||
|
<data name="UnknownSize" xml:space="preserve">
|
||||||
|
<value>알 수 없는 크기</value>
|
||||||
|
</data>
|
||||||
|
<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>
|
||||||
@@ -107,10 +107,10 @@
|
|||||||
<value>PNG图片</value>
|
<value>PNG图片</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ErrorImgPath" xml:space="preserve">
|
<data name="ErrorImgPath" xml:space="preserve">
|
||||||
<value>错误的图片路径!</value>
|
<value>错误的图片路径</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ErrorImgSize" xml:space="preserve">
|
<data name="ErrorImgSize" xml:space="preserve">
|
||||||
<value>非法的图片尺寸!</value>
|
<value>非法的图片尺寸</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="UnknownSize" xml:space="preserve">
|
<data name="UnknownSize" xml:space="preserve">
|
||||||
<value>未知大小</value>
|
<value>未知大小</value>
|
||||||
@@ -184,4 +184,10 @@
|
|||||||
<data name="No" xml:space="preserve">
|
<data name="No" xml:space="preserve">
|
||||||
<value>否</value>
|
<value>否</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ZoomIn" xml:space="preserve">
|
||||||
|
<value>放大</value>
|
||||||
|
</data>
|
||||||
|
<data name="ZoomOut" xml:space="preserve">
|
||||||
|
<value>缩小</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,22 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:controls="clr-namespace:HandyControl.Controls">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="../../Basic/Sizes.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="PinBoxBaseStyle" TargetType="controls:PinBox">
|
||||||
|
<Setter Property="ItemMargin" Value="4,0"/>
|
||||||
|
<Setter Property="ItemWidth" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="ItemHeight" Value="{StaticResource DefaultControlHeight}"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="controls:PinBox">
|
||||||
|
<UniformGrid Name="PART_Panel" Columns="{TemplateBinding Length}" Rows="1"/>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
|
<Style x:Key="SeparatorBaseStyle" TargetType="Separator">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<ControlTemplate x:Key="TipSliderThumbHorizontalTop" TargetType="Thumb">
|
<ControlTemplate x:Key="TipSliderThumbHorizontalTop" TargetType="Thumb">
|
||||||
<controls:InternalCanvas>
|
<controls:InternalCanvas>
|
||||||
<Label Name="LabelValue" Opacity="0" Canvas.Bottom="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}"/>
|
<Label Name="LabelValue" Opacity="0" Canvas.Bottom="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(controls:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
</controls:InternalCanvas>
|
</controls:InternalCanvas>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
|
|
||||||
<ControlTemplate x:Key="TipSliderThumbHorizontalBottom" TargetType="Thumb">
|
<ControlTemplate x:Key="TipSliderThumbHorizontalBottom" TargetType="Thumb">
|
||||||
<controls:InternalCanvas>
|
<controls:InternalCanvas>
|
||||||
<Label Name="LabelValue" Opacity="0" Canvas.Top="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}"/>
|
<Label Name="LabelValue" Opacity="0" Canvas.Top="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(controls:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
</controls:InternalCanvas>
|
</controls:InternalCanvas>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
|
|
||||||
<ControlTemplate x:Key="TipSliderThumbVerticalLeft" TargetType="Thumb">
|
<ControlTemplate x:Key="TipSliderThumbVerticalLeft" TargetType="Thumb">
|
||||||
<controls:InternalCanvas Orientation="Vertical">
|
<controls:InternalCanvas Orientation="Vertical">
|
||||||
<Label Name="LabelValue" Opacity="0" Canvas.Right="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}"/>
|
<Label Name="LabelValue" Opacity="0" Canvas.Right="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(controls:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
</controls:InternalCanvas>
|
</controls:InternalCanvas>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
|
|
||||||
<ControlTemplate x:Key="TipSliderThumbVerticalRight" TargetType="Thumb">
|
<ControlTemplate x:Key="TipSliderThumbVerticalRight" TargetType="Thumb">
|
||||||
<controls:InternalCanvas Orientation="Vertical">
|
<controls:InternalCanvas Orientation="Vertical">
|
||||||
<Label Name="LabelValue" Opacity="0" Canvas.Left="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}"/>
|
<Label Name="LabelValue" Opacity="0" Canvas.Left="28" Style="{StaticResource LabelPrimary}" Content="{Binding Value,RelativeSource={RelativeSource AncestorType=Slider}}" ContentStringFormat="{Binding Path=(controls:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
</controls:InternalCanvas>
|
</controls:InternalCanvas>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
@@ -223,14 +223,14 @@
|
|||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
<Condition Property="controls:TipElement.Placement" Value="TopLeft"/>
|
<Condition Property="controls:TipElement.Placement" Value="Top"/>
|
||||||
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
||||||
</MultiTrigger.Conditions>
|
</MultiTrigger.Conditions>
|
||||||
<Setter Property="Template" TargetName="Thumb" Value="{StaticResource TipSliderThumbHorizontalTop}"/>
|
<Setter Property="Template" TargetName="Thumb" Value="{StaticResource TipSliderThumbHorizontalTop}"/>
|
||||||
</MultiTrigger>
|
</MultiTrigger>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
<Condition Property="controls:TipElement.Placement" Value="BottomRight"/>
|
<Condition Property="controls:TipElement.Placement" Value="Bottom"/>
|
||||||
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
||||||
</MultiTrigger.Conditions>
|
</MultiTrigger.Conditions>
|
||||||
<Setter Property="Template" TargetName="Thumb" Value="{StaticResource TipSliderThumbHorizontalBottom}"/>
|
<Setter Property="Template" TargetName="Thumb" Value="{StaticResource TipSliderThumbHorizontalBottom}"/>
|
||||||
@@ -280,14 +280,14 @@
|
|||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
<Condition Property="controls:TipElement.Placement" Value="TopLeft"/>
|
<Condition Property="controls:TipElement.Placement" Value="Left"/>
|
||||||
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
||||||
</MultiTrigger.Conditions>
|
</MultiTrigger.Conditions>
|
||||||
<Setter Property="Template" TargetName="Thumb" Value="{StaticResource TipSliderThumbVerticalLeft}"/>
|
<Setter Property="Template" TargetName="Thumb" Value="{StaticResource TipSliderThumbVerticalLeft}"/>
|
||||||
</MultiTrigger>
|
</MultiTrigger>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
<Condition Property="controls:TipElement.Placement" Value="BottomRight"/>
|
<Condition Property="controls:TipElement.Placement" Value="Right"/>
|
||||||
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
||||||
</MultiTrigger.Conditions>
|
</MultiTrigger.Conditions>
|
||||||
<Setter Property="Template" TargetName="Thumb" Value="{StaticResource TipSliderThumbVerticalRight}"/>
|
<Setter Property="Template" TargetName="Thumb" Value="{StaticResource TipSliderThumbVerticalRight}"/>
|
||||||
@@ -709,7 +709,7 @@
|
|||||||
|
|
||||||
<ControlTemplate x:Key="TipRangeSliderThumbHorizontalTop" TargetType="controls:RangeThumb">
|
<ControlTemplate x:Key="TipRangeSliderThumbHorizontalTop" TargetType="controls:RangeThumb">
|
||||||
<controls:InternalCanvas>
|
<controls:InternalCanvas>
|
||||||
<Label Name="LabelValue" Opacity="0" Canvas.Bottom="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}"/>
|
<Label Name="LabelValue" Opacity="0" Canvas.Bottom="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(controls:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
</controls:InternalCanvas>
|
</controls:InternalCanvas>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
@@ -740,7 +740,7 @@
|
|||||||
|
|
||||||
<ControlTemplate x:Key="TipRangeSliderThumbHorizontalBottom" TargetType="controls:RangeThumb">
|
<ControlTemplate x:Key="TipRangeSliderThumbHorizontalBottom" TargetType="controls:RangeThumb">
|
||||||
<controls:InternalCanvas>
|
<controls:InternalCanvas>
|
||||||
<Label Name="LabelValue" Opacity="0" Canvas.Top="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}"/>
|
<Label Name="LabelValue" Opacity="0" Canvas.Top="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(controls:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
<Border Canvas.Bottom="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
</controls:InternalCanvas>
|
</controls:InternalCanvas>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
@@ -771,7 +771,7 @@
|
|||||||
|
|
||||||
<ControlTemplate x:Key="TipRangeSliderThumbVerticalLeft" TargetType="controls:RangeThumb">
|
<ControlTemplate x:Key="TipRangeSliderThumbVerticalLeft" TargetType="controls:RangeThumb">
|
||||||
<controls:InternalCanvas Orientation="Vertical">
|
<controls:InternalCanvas Orientation="Vertical">
|
||||||
<Label Name="LabelValue" Opacity="0" Canvas.Right="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}"/>
|
<Label Name="LabelValue" Opacity="0" Canvas.Right="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(controls:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
</controls:InternalCanvas>
|
</controls:InternalCanvas>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
@@ -802,7 +802,7 @@
|
|||||||
|
|
||||||
<ControlTemplate x:Key="TipRangeSliderThumbVerticalRight" TargetType="controls:RangeThumb">
|
<ControlTemplate x:Key="TipRangeSliderThumbVerticalRight" TargetType="controls:RangeThumb">
|
||||||
<controls:InternalCanvas Orientation="Vertical">
|
<controls:InternalCanvas Orientation="Vertical">
|
||||||
<Label Name="LabelValue" Opacity="0" Canvas.Left="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}"/>
|
<Label Name="LabelValue" Opacity="0" Canvas.Left="28" Style="{StaticResource LabelPrimary}" Content="{TemplateBinding Content}" ContentStringFormat="{Binding Path=(controls:TipElement.StringFormat),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
<Border Canvas.Right="0" Effect="{StaticResource EffectShadow1}" Name="BorderDot" BorderThickness="0" BorderBrush="{DynamicResource PrimaryBrush}" Width="18" Height="18" Background="White" CornerRadius="9"/>
|
||||||
</controls:InternalCanvas>
|
</controls:InternalCanvas>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
@@ -862,7 +862,7 @@
|
|||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
<Condition Property="controls:TipElement.Placement" Value="TopLeft"/>
|
<Condition Property="controls:TipElement.Placement" Value="Top"/>
|
||||||
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
||||||
</MultiTrigger.Conditions>
|
</MultiTrigger.Conditions>
|
||||||
<Setter Property="Template" TargetName="ThumbStart" Value="{StaticResource TipRangeSliderThumbHorizontalTop}"/>
|
<Setter Property="Template" TargetName="ThumbStart" Value="{StaticResource TipRangeSliderThumbHorizontalTop}"/>
|
||||||
@@ -870,7 +870,7 @@
|
|||||||
</MultiTrigger>
|
</MultiTrigger>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
<Condition Property="controls:TipElement.Placement" Value="BottomRight"/>
|
<Condition Property="controls:TipElement.Placement" Value="Bottom"/>
|
||||||
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
||||||
</MultiTrigger.Conditions>
|
</MultiTrigger.Conditions>
|
||||||
<Setter Property="Template" TargetName="ThumbStart" Value="{StaticResource TipRangeSliderThumbHorizontalBottom}"/>
|
<Setter Property="Template" TargetName="ThumbStart" Value="{StaticResource TipRangeSliderThumbHorizontalBottom}"/>
|
||||||
@@ -920,7 +920,7 @@
|
|||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
<Condition Property="controls:TipElement.Placement" Value="TopLeft"/>
|
<Condition Property="controls:TipElement.Placement" Value="Left"/>
|
||||||
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
||||||
</MultiTrigger.Conditions>
|
</MultiTrigger.Conditions>
|
||||||
<Setter Property="Template" TargetName="ThumbStart" Value="{StaticResource TipRangeSliderThumbVerticalLeft}"/>
|
<Setter Property="Template" TargetName="ThumbStart" Value="{StaticResource TipRangeSliderThumbVerticalLeft}"/>
|
||||||
@@ -928,7 +928,7 @@
|
|||||||
</MultiTrigger>
|
</MultiTrigger>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
<Condition Property="controls:TipElement.Placement" Value="BottomRight"/>
|
<Condition Property="controls:TipElement.Placement" Value="Right"/>
|
||||||
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
<Condition Property="controls:TipElement.Visibility" Value="Visible"/>
|
||||||
</MultiTrigger.Conditions>
|
</MultiTrigger.Conditions>
|
||||||
<Setter Property="Template" TargetName="ThumbStart" Value="{StaticResource TipRangeSliderThumbVerticalRight}"/>
|
<Setter Property="Template" TargetName="ThumbStart" Value="{StaticResource TipRangeSliderThumbVerticalRight}"/>
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="SeparatorBaseStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style x:Key="{x:Static StatusBar.SeparatorStyleKey}" BasedOn="{StaticResource SeparatorBaseStyle}" TargetType="Separator"/>
|
||||||
|
|
||||||
|
<Style x:Key="StatusBarBaseStyle" TargetType="StatusBar">
|
||||||
|
<Setter Property="BorderThickness" Value="0,1,0,0"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<ControlTemplate TargetType="controls:WatermarkTextBox">
|
<ControlTemplate TargetType="controls:WatermarkTextBox">
|
||||||
<controls:SimplePanel x:Name="WatermarkContent">
|
<controls:SimplePanel x:Name="WatermarkContent">
|
||||||
<TextBlock Text="{TemplateBinding Watermark}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{DynamicResource ThirdlyTextBrush}" Margin="{TemplateBinding Padding}" x:Name="PART_Watermark" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}"/>
|
<TextBlock Text="{TemplateBinding Watermark}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{DynamicResource ThirdlyTextBrush}" Margin="{TemplateBinding Padding}" x:Name="PART_Watermark" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}"/>
|
||||||
<ScrollViewer Style="{x:Null}" Padding="{TemplateBinding Padding}" Margin="-2,0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
<ScrollViewer Padding="{TemplateBinding Padding}" Margin="-2,0,-1,0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
</controls:SimplePanel>
|
</controls:SimplePanel>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="TextBox">
|
<ControlTemplate TargetType="TextBox">
|
||||||
<Border x:Name="border" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
<Border x:Name="border" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||||
<ScrollViewer Style="{x:Null}" Padding="{TemplateBinding Padding}" Margin="-2,0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
<ScrollViewer Padding="{TemplateBinding Padding}" Margin="-2,0,-1,0" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsEnabled" Value="false">
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Border x:Name="border" Grid.Row="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
<Border x:Name="border" Grid.Row="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
||||||
<TextBlock x:Name="Placeholder" Padding="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Row="1" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<TextBlock x:Name="Placeholder" Padding="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Row="1" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<ScrollViewer Style="{x:Null}" Padding="{TemplateBinding Padding}" Margin="-1,1" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Row="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
<ScrollViewer Padding="{TemplateBinding Padding}" Margin="-1,1" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Row="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsEnabled" Value="false">
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Border x:Name="border" Grid.Column="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
<Border x:Name="border" Grid.Column="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
||||||
<TextBlock x:Name="Placeholder" Padding="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Column="1" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<TextBlock x:Name="Placeholder" Padding="1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Grid.Column="1" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<ScrollViewer Style="{x:Null}" Padding="{TemplateBinding Padding}" Margin="-1,1" Grid.Column="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
<ScrollViewer Padding="{TemplateBinding Padding}" Margin="-1,1" Grid.Column="1" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsEnabled" Value="false">
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<TextBlock VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<ScrollViewer Style="{x:Null}" Margin="-2,0" Grid.Column="0" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
<ScrollViewer Margin="-2,0,-1,0" Grid.Column="0" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
<Button Height="{x:Static system:Double.NaN}" Command="interactivity:ControlCommands.Clear" Margin="0,0,7,0" Visibility="Collapsed" Name="ButtonClear" Width="16" Grid.Column="1" Style="{StaticResource ButtonIcon}" Padding="0,6" controls:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{Binding BorderBrush,ElementName=templateRoot}"/>
|
<Button Height="{x:Static system:Double.NaN}" Command="interactivity:ControlCommands.Clear" Margin="0,0,7,0" Visibility="Collapsed" Name="ButtonClear" Width="16" Grid.Column="1" Style="{StaticResource ButtonIcon}" Padding="0,6" controls:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{Binding BorderBrush,ElementName=templateRoot}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
<TextBlock VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Visibility="{TemplateBinding Text,Converter={StaticResource String2VisibilityReConverter}}" HorizontalAlignment="Stretch" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Path=(controls:InfoElement.Placeholder),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||||
<ScrollViewer Style="{x:Null}" Grid.Column="0" Margin="-2,0" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
<ScrollViewer Grid.Column="0" Margin="-2,0,-1,0" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
|
||||||
<Button Height="{x:Static system:Double.NaN}" Command="interactivity:ControlCommands.Clear" Margin="0,0,7,0" Visibility="Collapsed" Name="ButtonClear" Width="16" Grid.Column="1" Style="{StaticResource ButtonIcon}" Padding="0,6" controls:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{Binding BorderBrush,ElementName=templateRoot}"/>
|
<Button Height="{x:Static system:Double.NaN}" Command="interactivity:ControlCommands.Clear" Margin="0,0,7,0" Visibility="Collapsed" Name="ButtonClear" Width="16" Grid.Column="1" Style="{StaticResource ButtonIcon}" Padding="0,6" controls:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" Foreground="{Binding BorderBrush,ElementName=templateRoot}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:controls="clr-namespace:HandyControl.Controls"
|
||||||
|
xmlns:langs="clr-namespace:HandyControl.Properties.Langs">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="../Basic/Sizes.xaml"/>
|
||||||
|
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style TargetType="FlowDocumentScrollViewer">
|
||||||
|
<Setter Property="controls:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||||
|
<Setter Property="BorderThickness" Value="1"/>
|
||||||
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="FlowDocumentScrollViewer">
|
||||||
|
<Grid Background="{TemplateBinding Background}">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Margin="{TemplateBinding Padding}" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}">
|
||||||
|
<ScrollViewer x:Name="PART_ContentHost" CanContentScroll="True" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
|
</Border>
|
||||||
|
<Border x:Name="PART_ToolBarHost" Grid.Row="1" Margin="0,4">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
<ColumnDefinition Width="*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border x:Name="PART_FindToolBarHost" Grid.Column="0" HorizontalAlignment="Left" Visibility="Collapsed" VerticalAlignment="Center"/>
|
||||||
|
<Grid Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<RepeatButton Height="18" Width="18" Padding="4,7" controls:BorderElement.CornerRadius="9" controls:IconElement.Geometry="{StaticResource SubGeometry}" Grid.Column="0" Command="NavigationCommands.DecreaseZoom" IsEnabled="{TemplateBinding CanDecreaseZoom}" ToolTip="{x:Static langs:Lang.ZoomOut}"/>
|
||||||
|
<Slider controls:TipElement.Visibility="Visible" controls:TipElement.Placement="Top" Grid.Column="1" HorizontalAlignment="Stretch" LargeChange="{TemplateBinding ZoomIncrement}" Maximum="{TemplateBinding MaxZoom}" Minimum="{TemplateBinding MinZoom}" SmallChange="{TemplateBinding ZoomIncrement}" TickFrequency="{TemplateBinding ZoomIncrement}" Value="{Binding Zoom, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Center" Width="180"/>
|
||||||
|
<RepeatButton Height="18" Width="18" Padding="4" controls:BorderElement.CornerRadius="9" controls:IconElement.Geometry="{StaticResource AddGeometry}" Grid.Column="2" Command="NavigationCommands.IncreaseZoom" IsEnabled="{TemplateBinding CanIncreaseZoom}" ToolTip="{x:Static langs:Lang.ZoomIn}"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:controls="clr-namespace:HandyControl.Controls">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="Base/PinBoxBaseStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style BasedOn="{StaticResource PinBoxBaseStyle}" TargetType="controls:PinBox"/>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="Base/SeparatorBaseStyle.xaml"/>
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
|
||||||
|
<Style BasedOn="{StaticResource SeparatorBaseStyle}" TargetType="Separator"/>
|
||||||
|
|
||||||
|
</ResourceDictionary>
|
||||||