From e3177843ca6d77a962b3676d8b51e50e142093cf Mon Sep 17 00:00:00 2001
From: guanguanchuangyu <3246907890@qq.com>
Date: Mon, 13 Jan 2020 21:55:55 +0800
Subject: [PATCH 1/8] add doc of native_radioButton
---
.../native_controls/radioButton/index.md | 126 +++++++++++++++++-
1 file changed, 124 insertions(+), 2 deletions(-)
diff --git a/doc/source/handycontrol/native_controls/radioButton/index.md b/doc/source/handycontrol/native_controls/radioButton/index.md
index ca12ad62..8e2f6a68 100644
--- a/doc/source/handycontrol/native_controls/radioButton/index.md
+++ b/doc/source/handycontrol/native_controls/radioButton/index.md
@@ -1,5 +1,127 @@
---
-title: 建设中
+title: RadioButton 单选按钮
---
-建设中
\ No newline at end of file
+# RadioButtonBaseStyle
+
+`RadioButton`基础样式,不建议直接使用,常作为其他样式基类样式
+
+## 案例:
+
+```xml
+
+```
+
+`xaml`中:
+
+```xml
+
+
+
+
+
+
+```
+
+效果:
+
+
+
+# RadioButtonIcon:RadioButtonBaseStyle
+
+带图标样式,可只显示图标也可图文显示
+
+## 案例:
+
+```xml
+
+
+
+
+
+
+```
+
+效果:
+
+
+
+# RadioGroupItemBaseStyle
+
+`ButtonGroup`控件中的子集`RadioButton`样式基类,不建议直接使用,常作为`ButtonGroup`中`Item`样式基类,同时与`ButtonGroup`控件配套使用
+
+## 案例:
+
+```xml
+
+```
+
+`xaml`中:
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+效果:
+
+
+
+# RadioGroup关联样式
+
+| 样式Key | 用途 | 基类样式 |
+| ----------------------------- | ------------------------------------ | ----------------------- |
+| RadioGroupItemDefault | RadioGroupItem默认样式 | RadioGroupItemBaseStyle |
+| RadioGroupItemHorizontalFirst | RadioGroupItem水平头样式(从左至右) | RadioGroupItemBaseStyle |
+| RadioGroupItemHorizontalLast | RadioGroupItem水平尾样式(从左至右) | RadioGroupItemBaseStyle |
+| RadioGroupItemSingle | RadioGroupItem单项样式 | RadioGroupItemBaseStyle |
+| RadioGroupItemVerticalFirst | RadioGroupItem垂直头样式(从上至下) | RadioGroupItemBaseStyle |
+| RadioGroupItemVerticalLast | RadioGroupItem垂直尾样式(从上至下) | RadioGroupItemBaseStyle |
+
+## 案例:
+
+单个`RadioButton`样式:
+
+```xml
+
+```
+
+效果:
+
+
+
+多个`RadioButton`垂直样式:
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+效果:
+
+
\ No newline at end of file
From e0663ae2446e945ccc284d5fa0d3591132bd0920 Mon Sep 17 00:00:00 2001
From: DinoChan
Date: Sun, 19 Jan 2020 15:25:55 +0800
Subject: [PATCH 2/8] Add NumericUpDown Document
---
.../extend_controls/numericUpDown/index.md | 104 +++++++++++++++++-
1 file changed, 102 insertions(+), 2 deletions(-)
diff --git a/doc/source/handycontrol/extend_controls/numericUpDown/index.md b/doc/source/handycontrol/extend_controls/numericUpDown/index.md
index ca12ad62..0d5c0042 100644
--- a/doc/source/handycontrol/extend_controls/numericUpDown/index.md
+++ b/doc/source/handycontrol/extend_controls/numericUpDown/index.md
@@ -1,5 +1,105 @@
---
-title: 建设中
+title: NumericUpDown
---
-建设中
\ No newline at end of file
+NumericUpDown 控件看起来像一对用户可以单击来调整值的箭头按钮和TextBox的组合,该控件显示并设置数值(Value)。 用户可以通过单击向上和向下箭头,或通过在控件的TextBox部分中键入一个数字来改变Value。
+
+``` CS
+[TemplatePart(Name = ElementTextBox, Type = typeof(DatePickerTextBox))]
+public class DatePicker : System.Windows.Controls.DatePicker, IDataInput
+```
+
+# 创建NumericUpDown并设置Value
+
+``` XML
+
+```
+
+``` CS
+var numericUpDown = new NumericUpDown();
+numericUpDown.Value = 100;
+```
+
+生成的NumericUpDown如下图所示:
+
+
+
+
+# 设置DecimalPlaces
+
+如果需要改变Value显示的小数位数,可以改变DecimalPlaces。DecimalPlaces是一个**int?**类型,当它为null时不限制显示的小数位数,否则显示的小数位数为DecimalPlaces的Value。
+
+``` XML
+
+```
+
+``` CS
+numericUpDown.Value = 10.12345;
+numericUpDown.DecimalPlaces = 2;
+```
+
+
+
+# 设置Increment
+
+可以通设置Increment改变单击一下按钮时增加或减少的数量。
+
+``` XML
+
+```
+
+``` CS
+numericUpDown.Increment = 10;
+```
+
+# 设置上限和下限
+
+可以通设置Maximum和Minimum限制Value的上限和下限。
+
+``` XML
+
+```
+
+``` CS
+numericUpDown.Minimum = 10;
+numericUpDown.Maximum = 1000;
+```
+
+# 设置标题和占位符文本
+
+你可以将 Header(标题)和 Placeholder(占位符)添加到NumericUpDown,以向用户指示其用途。要使用这两个附加属性,需要先应用 **NumericUpDownPlus** 样式。
+
+``` XML
+
+```
+
+
+
+# 属性
+
+| 属性 | 描述 |
+| ---------------- | ------------------ |
+| Value | 获取或设置当前值 |
+| Maximum | 获取或设置最大允许值 |
+| Minimum | 获取或设置最小允许值 |
+| Increment | 获取或设置单击向上或向下按钮时,数字显示框(也称作 up-down 控件)递增或递减的值。 |
+| DecimalPlaces |获取或设置NumericUpDown中要显示的十进制位数。 此属性不会影响 Value 属性。 |
+| VerifyFunc | 获取或设置数据验证委托 |
+| IsError | 获取或设置数据是否错误 |
+| ErrorStr | 获取或设置错误提示 |
+| TextType | 获取或设置文本类型 |
+| ShowClearButton | 获取或设置是否显示清除按钮 |
+
+# 方法
+
+| 方法 | 描述 |
+| ---------------- | ------------------ |
+| VerifyData() | 验证数据 |
+
+# 事件
+
+| 事件 | 描述 |
+| ---------------- | ------------------ |
+| ValueChanged | 在以某种方式更改 Value 属性后发生。 |
From d7169636804d82253026b9a07cabd68f8bcbe086 Mon Sep 17 00:00:00 2001
From: DinoChan
Date: Sun, 19 Jan 2020 15:30:38 +0800
Subject: [PATCH 3/8] FIX SOMETHING
---
doc/source/handycontrol/extend_controls/numericUpDown/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/source/handycontrol/extend_controls/numericUpDown/index.md b/doc/source/handycontrol/extend_controls/numericUpDown/index.md
index 0d5c0042..d2376e18 100644
--- a/doc/source/handycontrol/extend_controls/numericUpDown/index.md
+++ b/doc/source/handycontrol/extend_controls/numericUpDown/index.md
@@ -27,7 +27,7 @@ numericUpDown.Value = 100;
# 设置DecimalPlaces
-如果需要改变Value显示的小数位数,可以改变DecimalPlaces。DecimalPlaces是一个**int?**类型,当它为null时不限制显示的小数位数,否则显示的小数位数为DecimalPlaces的Value。
+如果需要改变Value显示的小数位数,可以改变DecimalPlaces。DecimalPlaces是一个 **int?** 类型,当它为null时不限制显示的小数位数,否则显示的小数位数为DecimalPlaces的Value。
``` XML
From 1b051a6803b50222831ef7556ec8aec0cffdb1fa Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Mon, 20 Jan 2020 00:07:33 +0800
Subject: [PATCH 4/8] Update index.md
---
.../native_controls/radioButton/index.md | 22 +++++--------------
1 file changed, 5 insertions(+), 17 deletions(-)
diff --git a/doc/source/handycontrol/native_controls/radioButton/index.md b/doc/source/handycontrol/native_controls/radioButton/index.md
index 8e2f6a68..0773732f 100644
--- a/doc/source/handycontrol/native_controls/radioButton/index.md
+++ b/doc/source/handycontrol/native_controls/radioButton/index.md
@@ -4,15 +4,9 @@ title: RadioButton 单选按钮
# RadioButtonBaseStyle
-`RadioButton`基础样式,不建议直接使用,常作为其他样式基类样式
+单选按钮默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
-## 案例:
-
-```xml
-
-```
-
-`xaml`中:
+案例:
```xml
@@ -31,7 +25,7 @@ title: RadioButton 单选按钮
带图标样式,可只显示图标也可图文显示
-## 案例:
+案例:
```xml
@@ -50,13 +44,7 @@ title: RadioButton 单选按钮
`ButtonGroup`控件中的子集`RadioButton`样式基类,不建议直接使用,常作为`ButtonGroup`中`Item`样式基类,同时与`ButtonGroup`控件配套使用
-## 案例:
-
-```xml
-
-```
-
-`xaml`中:
+案例:
```xml
@@ -89,7 +77,7 @@ title: RadioButton 单选按钮
| RadioGroupItemVerticalFirst | RadioGroupItem垂直头样式(从上至下) | RadioGroupItemBaseStyle |
| RadioGroupItemVerticalLast | RadioGroupItem垂直尾样式(从上至下) | RadioGroupItemBaseStyle |
-## 案例:
+案例:
单个`RadioButton`样式:
From e4fa1db5530bf18572290d40bc0f3fc8bc0eeee5 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Mon, 20 Jan 2020 00:29:12 +0800
Subject: [PATCH 5/8] Update index.md
---
doc/source/handycontrol/extend_controls/numericUpDown/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/source/handycontrol/extend_controls/numericUpDown/index.md b/doc/source/handycontrol/extend_controls/numericUpDown/index.md
index d2376e18..ad0773ae 100644
--- a/doc/source/handycontrol/extend_controls/numericUpDown/index.md
+++ b/doc/source/handycontrol/extend_controls/numericUpDown/index.md
@@ -1,5 +1,5 @@
---
-title: NumericUpDown
+title: NumericUpDown 数值选择控件
---
NumericUpDown 控件看起来像一对用户可以单击来调整值的箭头按钮和TextBox的组合,该控件显示并设置数值(Value)。 用户可以通过单击向上和向下箭头,或通过在控件的TextBox部分中键入一个数字来改变Value。
From 5ac4c644d52bab4f50dad18978d01730095325d9 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Tue, 21 Jan 2020 00:13:20 +0800
Subject: [PATCH 6/8] fixed #314
---
.../Styles/NativeProgressBarDemoCtl.xaml | 20 ++++-
.../Styles/Base/ProgressBarBaseStyle.xaml | 73 ++++++++++++++++---
.../Themes/Styles/ProgressBar.xaml | 54 +++++++++++---
3 files changed, 120 insertions(+), 27 deletions(-)
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Styles/NativeProgressBarDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/NativeProgressBarDemoCtl.xaml
index 1cd461b3..aecf271e 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Styles/NativeProgressBarDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Styles/NativeProgressBarDemoCtl.xaml
@@ -11,7 +11,7 @@
-
+
@@ -27,8 +27,8 @@
-
-
+
+
@@ -39,6 +39,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ProgressBarBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ProgressBarBaseStyle.xaml
index 214e7556..4e5ac058 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/ProgressBarBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/ProgressBarBaseStyle.xaml
@@ -1,7 +1,8 @@
+ xmlns:shapes="clr-namespace:HandyControl.Expression.Shapes"
+ xmlns:system="clr-namespace:System;assembly=mscorlib">
@@ -33,18 +34,58 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -70,11 +111,19 @@
-
+
+
+
+
+
+
+
+
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/ProgressBar.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/ProgressBar.xaml
index dba2c685..cb21a15c 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/ProgressBar.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/ProgressBar.xaml
@@ -1,6 +1,7 @@
+ xmlns:controls="clr-namespace:HandyControl.Controls"
+ xmlns:system="clr-namespace:System;assembly=mscorlib">
@@ -42,8 +43,8 @@
-
-
+
+
@@ -72,8 +73,8 @@
-
-
+
+
@@ -102,8 +103,8 @@
-
-
+
+
@@ -132,8 +133,8 @@
-
-
+
+
@@ -162,8 +163,8 @@
-
-
+
+
@@ -223,14 +224,43 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 3957a3b7bb6e93fe8f2ebc7732c959b73f751ca5 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Tue, 21 Jan 2020 23:10:58 +0800
Subject: [PATCH 7/8] fixed #313
---
.../UserControl/Main/LeftMainContent.xaml | 2 +-
.../HandyControl_Shared/Controls/Input/NumericUpDown.cs | 8 +-------
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml
index efed5131..6776dbbc 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/LeftMainContent.xaml
@@ -24,7 +24,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
index c18bbb0a..992adabf 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
@@ -196,13 +196,7 @@ namespace HandyControl.Controls
ctl.Value = maximum;
}
- var result = num > maximum ? maximum : num;
- if (!ctl.DecimalPlaces.HasValue)
- {
- result = Math.Floor(result);
- }
-
- return result;
+ return num > maximum ? maximum : num;
}
///
From e1a07c0accc02b632510277bdbaa7d8afea84240 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Tue, 21 Jan 2020 23:28:06 +0800
Subject: [PATCH 8/8] modified some styles
---
src/Core_30/HandyControl_Core_30/Themes/Styles/MessageBox.xaml | 2 +-
src/Net_40/HandyControl_Net_40/Themes/Styles/MessageBox.xaml | 2 +-
.../HandyControl_Net_GE45/Themes/Styles/MessageBox.xaml | 2 +-
.../Window/CustomNonClientAreaWindow.xaml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Core_30/HandyControl_Core_30/Themes/Styles/MessageBox.xaml b/src/Core_30/HandyControl_Core_30/Themes/Styles/MessageBox.xaml
index 0cd58286..6eae7d67 100644
--- a/src/Core_30/HandyControl_Core_30/Themes/Styles/MessageBox.xaml
+++ b/src/Core_30/HandyControl_Core_30/Themes/Styles/MessageBox.xaml
@@ -73,7 +73,7 @@
-
+
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/MessageBox.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/MessageBox.xaml
index 7c7789d7..8af1741b 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Styles/MessageBox.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/MessageBox.xaml
@@ -74,7 +74,7 @@
-
+
diff --git a/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/MessageBox.xaml b/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/MessageBox.xaml
index 0cd58286..6eae7d67 100644
--- a/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/MessageBox.xaml
+++ b/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/MessageBox.xaml
@@ -73,7 +73,7 @@
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/Window/CustomNonClientAreaWindow.xaml b/src/Shared/HandyControlDemo_Shared/Window/CustomNonClientAreaWindow.xaml
index 8cfc0d4c..7dc14330 100644
--- a/src/Shared/HandyControlDemo_Shared/Window/CustomNonClientAreaWindow.xaml
+++ b/src/Shared/HandyControlDemo_Shared/Window/CustomNonClientAreaWindow.xaml
@@ -9,7 +9,7 @@
OtherButtonForeground="{DynamicResource ReverseTextBrush}"
CloseButtonForeground="{DynamicResource ReverseTextBrush}"
NonClientAreaBackground="{DynamicResource ToolBarBackground}"
- NonClientAreaHeight="69"
+ NonClientAreaHeight="62"
Background="{DynamicResource MainContentBackgroundBrush}"
WindowStartupLocation="CenterScreen"
ShowTitle="False"