From 38b060f02bf2fcf5db3492ad6a57903fcd491364 Mon Sep 17 00:00:00 2001
From: guanguanchuangyu <3246907890@qq.com>
Date: Mon, 2 Dec 2019 21:48:30 +0800
Subject: [PATCH 01/11] add doc of native_control/Label,Listbox
---
.../native_controls/image/index.md | 27 +++-
.../native_controls/label/index.md | 89 ++++++++++-
.../native_controls/listBox/index.md | 139 +++++++++++++++++-
3 files changed, 249 insertions(+), 6 deletions(-)
diff --git a/doc/source/handycontrol/native_controls/image/index.md b/doc/source/handycontrol/native_controls/image/index.md
index ca12ad62..d11560c0 100644
--- a/doc/source/handycontrol/native_controls/image/index.md
+++ b/doc/source/handycontrol/native_controls/image/index.md
@@ -1,5 +1,28 @@
---
-title: 建设中
+title: Image图片
---
-建设中
\ No newline at end of file
+在`HandyControl`中,对应原生的`Image`控件,仅仅提供了一个默认的控件样式,并未提供特殊样式,对于个性化定制,需要使用者自行定制
+
+默认样式定义:
+
+```
+
+```
+
+案例:
+
+```
+
+
+
+
+```
+
+
+
diff --git a/doc/source/handycontrol/native_controls/label/index.md b/doc/source/handycontrol/native_controls/label/index.md
index ca12ad62..7d37086a 100644
--- a/doc/source/handycontrol/native_controls/label/index.md
+++ b/doc/source/handycontrol/native_controls/label/index.md
@@ -1,5 +1,90 @@
---
-title: 建设中
+title: Lable标签
---
-建设中
\ No newline at end of file
+# LabelBaseStyle
+
+Label标签 默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用,
+
+具体源码见:[LabelBaseStyle.xaml]( https://github.com/HandyOrg/HandyControl/blob/master/src/Shared/HandyControl_Shared/Themes/Styles/Base/LabelBaseStyle.xaml )
+
+使用如下:
+
+```
+
+```
+
+案例:
+
+```
+
+```
+
+
+
+# LabelPrimary
+
+Label标签 主样式
+
+案例:
+
+```
+
+```
+
+
+
+# LabelSuccess
+
+Label标签 成功类型样式
+
+案例:
+
+```
+
+```
+
+
+
+# LabelInfo
+
+Label标签 信息类型样式
+
+案例:
+
+```
+
+```
+
+
+
+# LabelWarning
+
+Label标签 警告类型样式
+
+案例:
+
+```
+
+```
+
+
+
+# LabelDanger
+
+Label标签 危险类型样式
+
+```
+
+```
+
+
+
diff --git a/doc/source/handycontrol/native_controls/listBox/index.md b/doc/source/handycontrol/native_controls/listBox/index.md
index ca12ad62..7c897e06 100644
--- a/doc/source/handycontrol/native_controls/listBox/index.md
+++ b/doc/source/handycontrol/native_controls/listBox/index.md
@@ -1,5 +1,140 @@
---
-title: 建设中
+title: ListBox 列表框
---
-建设中
\ No newline at end of file
+# ListBoxBaseStyle
+
+ ListBox默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用,
+
+样式源码见[ListBoxBaseStyle.xaml](https://github.com/HandyOrg/HandyControl/blob/master/src/Shared/HandyControl_Shared/Themes/Styles/Base/ListBoxBaseStyle.xaml )。
+
+案例:
+
+```
+
+
+```
+
+
+
+# ListBoxCustom
+
+ListBox列表Custom样式,该样式保留了Listbox的基本属性样式,而数据显示样式由当前用户自定义,实现个性化定制
+
+案例:
+
+```
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
+
+
+
+# WrapPanelHorizontalListBox
+
+ListBox列表显示布局容器为WrapPanel,水平方向显示样式
+
+案例:
+
+```
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
+
+# WrapPanelVerticalListBox
+
+ListBox列表显示布局容器为WrapPanel,垂直方向显示样式
+
+案例:
+
+```
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
+
+# StackPanelHorizontalListBox
+
+ListBox列表显示布局容器为StackPanel,水平方向显示样式
+
+案例:
+
+```
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
+
+# StackPanelVerticalListBox
+
+ListBox列表显示布局容器为StackPanel,垂直方向显示样式
+
+案例:
+
+```
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
\ No newline at end of file
From bb3e379ed422f284e0a6f11496481ff41b869c56 Mon Sep 17 00:00:00 2001
From: guanguanchuangyu <3246907890@qq.com>
Date: Sun, 8 Dec 2019 22:33:00 +0800
Subject: [PATCH 02/11] doc of attach/tipElement doc of
native_controls/listview,menu,passwordbox
---
.../handycontrol/attach/tipElement/index.md | 41 +++++++++-
.../native_controls/listView/index.md | 22 ++++-
.../native_controls/menu/index.md | 81 ++++++++++++++++++-
.../native_controls/passwordBox/index.md | 45 ++++++++++-
.../native_controls/progressBar/index.md | 3 +-
5 files changed, 182 insertions(+), 10 deletions(-)
diff --git a/doc/source/handycontrol/attach/tipElement/index.md b/doc/source/handycontrol/attach/tipElement/index.md
index ca12ad62..6b91f48d 100644
--- a/doc/source/handycontrol/attach/tipElement/index.md
+++ b/doc/source/handycontrol/attach/tipElement/index.md
@@ -1,5 +1,42 @@
---
-title: 建设中
+title: TipElement 提示元素
---
-建设中
\ No newline at end of file
+# 属性
+
+| 名称 | 用途 |
+| ---------- | -------- |
+| Placement | 提示元素显示位置 |
+| Visibility | 是否可见 |
+
+
+# 使用案例
+
+## Placement 提示元素显示位置
+
+该属性,用于设定提示元素显示位置,目前支持BottomRight和TopLeft(默认值)
+
+```
+
+
+```
+
+效果
+
+
+
+
+
diff --git a/doc/source/handycontrol/native_controls/listView/index.md b/doc/source/handycontrol/native_controls/listView/index.md
index ca12ad62..308ecd17 100644
--- a/doc/source/handycontrol/native_controls/listView/index.md
+++ b/doc/source/handycontrol/native_controls/listView/index.md
@@ -1,5 +1,23 @@
---
-title: 建设中
+title: ListView 列表视图
---
-建设中
\ No newline at end of file
+`HandyControl`中仅仅提供了一个默认的`ListView`的资源样式,可根据个人需求,自行定义
+
+# 案例
+
+```
+
+
+
+
+
+
+
+
+
+```
+
+
+
+
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/menu/index.md b/doc/source/handycontrol/native_controls/menu/index.md
index ca12ad62..33edb44e 100644
--- a/doc/source/handycontrol/native_controls/menu/index.md
+++ b/doc/source/handycontrol/native_controls/menu/index.md
@@ -1,5 +1,82 @@
---
-title: 建设中
+title: Menu 菜单
---
-建设中
\ No newline at end of file
+# MenuBaseStyle
+
+`HandyControl`中的菜单默认样式,一般不建议直接使用,而是选择继承,便于个人自定义风格
+
+样式
+
+```xml
+
+
+```
+
+使用
+
+```
+
+```
+
+数据视图
+
+```c#
+ //菜单子项视图类
+ public class MenuItemViewModel
+ {
+ public List Children { get; set; }
+ public MenuItemViewModel Parent { get; set; }
+ public string Name { get; set; }
+ public string Remark { get; set; }
+ }
+ //菜单数据视图类
+ public class MenuViewModel
+ {
+ public MenuViewModel()
+ {
+ Menus = new List
+ {
+ new MenuItemViewModel
+ {
+ Name="一级菜单",
+ Children = new List{
+ new MenuItemViewModel{
+ Name="二级菜单"
+ }
+ }
+ },
+ new MenuItemViewModel
+ {
+ Name="一级菜单",
+ Children = new List{
+ new MenuItemViewModel{
+ Name="二级菜单"
+ }
+ }
+ },
+ new MenuItemViewModel
+ {
+ Name="一级菜单",
+ Children = new List{
+ new MenuItemViewModel{
+ Name="二级菜单"
+ }
+ }
+ }
+ };
+ }
+ public List Menus { get; set; }
+ }
+```
+
+效果
+
+
+
diff --git a/doc/source/handycontrol/native_controls/passwordBox/index.md b/doc/source/handycontrol/native_controls/passwordBox/index.md
index ca12ad62..19bbda94 100644
--- a/doc/source/handycontrol/native_controls/passwordBox/index.md
+++ b/doc/source/handycontrol/native_controls/passwordBox/index.md
@@ -1,5 +1,46 @@
---
-title: 建设中
+title: PasswordBox 密码框
---
-建设中
\ No newline at end of file
+# PasswordBoxBaseStyle
+
+控件默认样式,该样式不建议直接使用,而是选择继承的方式进行个人控件样式的处理,参考在线资源[PasswordBoxBaseStyle](https://github.com/HandyOrg/HandyControl/blob/master/src/Shared/HandyControl_Shared/Themes/Styles/Base/PasswordBoxBaseStyle.xaml)
+
+```
+
+```
+
+使用
+
+```
+
+```
+
+效果
+
+
+
+# PasswordBoxExtendBaseStyle
+
+控件拓展基础样式,是样式`PasswordBoxExtend`的基本样式,不建议直接使用,而是选择使用`PasswordBoxExtend`,该样式支持添加`PasswordBox`专用附加属性`PasswordBoxAttach`、额外信息元素`InfoElement`和标题元素`TitleElement`
+
+```
+
+
+
+```
+
+效果
+
+
+
diff --git a/doc/source/handycontrol/native_controls/progressBar/index.md b/doc/source/handycontrol/native_controls/progressBar/index.md
index ca12ad62..794ae369 100644
--- a/doc/source/handycontrol/native_controls/progressBar/index.md
+++ b/doc/source/handycontrol/native_controls/progressBar/index.md
@@ -1,5 +1,4 @@
---
-title: 建设中
+title: ProgressBar 进度条
---
-建设中
\ No newline at end of file
From 7f03a1015a1b41f8983e3ae458afd6b4c5cc1937 Mon Sep 17 00:00:00 2001
From: guanguanchuangyu <3246907890@qq.com>
Date: Mon, 23 Dec 2019 21:31:09 +0800
Subject: [PATCH 03/11] add progressbar.md
---
.../native_controls/progressBar/index.md | 81 +++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/doc/source/handycontrol/native_controls/progressBar/index.md b/doc/source/handycontrol/native_controls/progressBar/index.md
index 794ae369..4e37ca4c 100644
--- a/doc/source/handycontrol/native_controls/progressBar/index.md
+++ b/doc/source/handycontrol/native_controls/progressBar/index.md
@@ -2,3 +2,84 @@
title: ProgressBar 进度条
---
+# ProgressBarBaseStyle
+
+`HandyControl`中自带的默认样式,不建议直接使用而是选择继承的方式,案例如下:
+
+```
+
+```
+
+# 其他样式
+
+`HandyControl`中自带的其他样式和效果,其中包含如下样式:
+
+| 样式Key | 用途 |
+| ------------------ | ---- |
+| ProgressBarSuccess | 成功色进度条 |
+| ProgressBarInfo | 提示色进度条 |
+| ProgressBarWarning | 警告色进度条 |
+| ProgressBarDanger | 危险色进度条 |
+| ProgressBarPrimaryStripe | 主题色条纹进度条 |
+| ProgressBarSuccessStripe | 成功色条纹进度条 |
+| ProgressBarInfoStripe | 信息色条纹进度条 |
+| ProgressBarWarningStripe | 警告色条纹进度条 |
+| ProgressBarDangerStripe | 危险色条纹进度条 |
+| ProgressBarFlat | 扁平风格 |
+
+案例:
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+效果:
+
+
+# 温馨提示
+
+对于进度条进度颜色、圆角以及其他样式的个人使用需求,可查看`HandyControl`开源目中的[源码样式部分](https://github.com/HandyOrg/HandyControl/blob/master/src/Shared/HandyControl_Shared/Themes/Styles/ProgressBar.xaml)自行定义
+
From 585f49306e38032b5b089dda2a390f8bdb03d331 Mon Sep 17 00:00:00 2001
From: guanguanchuangyu <3246907890@qq.com>
Date: Mon, 23 Dec 2019 22:07:08 +0800
Subject: [PATCH 04/11] reset The progressbar.md
---
.../native_controls/progressBar/index.md | 85 -------------------
1 file changed, 85 deletions(-)
diff --git a/doc/source/handycontrol/native_controls/progressBar/index.md b/doc/source/handycontrol/native_controls/progressBar/index.md
index 4e37ca4c..e69de29b 100644
--- a/doc/source/handycontrol/native_controls/progressBar/index.md
+++ b/doc/source/handycontrol/native_controls/progressBar/index.md
@@ -1,85 +0,0 @@
----
-title: ProgressBar 进度条
----
-
-# ProgressBarBaseStyle
-
-`HandyControl`中自带的默认样式,不建议直接使用而是选择继承的方式,案例如下:
-
-```
-
-```
-
-# 其他样式
-
-`HandyControl`中自带的其他样式和效果,其中包含如下样式:
-
-| 样式Key | 用途 |
-| ------------------ | ---- |
-| ProgressBarSuccess | 成功色进度条 |
-| ProgressBarInfo | 提示色进度条 |
-| ProgressBarWarning | 警告色进度条 |
-| ProgressBarDanger | 危险色进度条 |
-| ProgressBarPrimaryStripe | 主题色条纹进度条 |
-| ProgressBarSuccessStripe | 成功色条纹进度条 |
-| ProgressBarInfoStripe | 信息色条纹进度条 |
-| ProgressBarWarningStripe | 警告色条纹进度条 |
-| ProgressBarDangerStripe | 危险色条纹进度条 |
-| ProgressBarFlat | 扁平风格 |
-
-案例:
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-```
-效果:
-
-
-# 温馨提示
-
-对于进度条进度颜色、圆角以及其他样式的个人使用需求,可查看`HandyControl`开源目中的[源码样式部分](https://github.com/HandyOrg/HandyControl/blob/master/src/Shared/HandyControl_Shared/Themes/Styles/ProgressBar.xaml)自行定义
-
From dd45e7e32314211e1b49dbc2e81c3f50ed159e16 Mon Sep 17 00:00:00 2001
From: guanguanchuangyu <3246907890@qq.com>
Date: Mon, 23 Dec 2019 22:07:51 +0800
Subject: [PATCH 05/11] add doc of native_controls.progressbar.md
---
.../native_controls/progressBar/index.md | 85 +++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/doc/source/handycontrol/native_controls/progressBar/index.md b/doc/source/handycontrol/native_controls/progressBar/index.md
index e69de29b..4e37ca4c 100644
--- a/doc/source/handycontrol/native_controls/progressBar/index.md
+++ b/doc/source/handycontrol/native_controls/progressBar/index.md
@@ -0,0 +1,85 @@
+---
+title: ProgressBar 进度条
+---
+
+# ProgressBarBaseStyle
+
+`HandyControl`中自带的默认样式,不建议直接使用而是选择继承的方式,案例如下:
+
+```
+
+```
+
+# 其他样式
+
+`HandyControl`中自带的其他样式和效果,其中包含如下样式:
+
+| 样式Key | 用途 |
+| ------------------ | ---- |
+| ProgressBarSuccess | 成功色进度条 |
+| ProgressBarInfo | 提示色进度条 |
+| ProgressBarWarning | 警告色进度条 |
+| ProgressBarDanger | 危险色进度条 |
+| ProgressBarPrimaryStripe | 主题色条纹进度条 |
+| ProgressBarSuccessStripe | 成功色条纹进度条 |
+| ProgressBarInfoStripe | 信息色条纹进度条 |
+| ProgressBarWarningStripe | 警告色条纹进度条 |
+| ProgressBarDangerStripe | 危险色条纹进度条 |
+| ProgressBarFlat | 扁平风格 |
+
+案例:
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+效果:
+
+
+# 温馨提示
+
+对于进度条进度颜色、圆角以及其他样式的个人使用需求,可查看`HandyControl`开源目中的[源码样式部分](https://github.com/HandyOrg/HandyControl/blob/master/src/Shared/HandyControl_Shared/Themes/Styles/ProgressBar.xaml)自行定义
+
From 3fec1a56bf6c0184376c4987b3d5f3b0bb701463 Mon Sep 17 00:00:00 2001
From: Mahdi
Date: Fri, 27 Dec 2019 17:52:07 +0330
Subject: [PATCH 06/11] Fix poptip background
---
.../HandyControl_Shared/Themes/Styles/Base/PoptipBaseStyle.xaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/PoptipBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/PoptipBaseStyle.xaml
index 9c513359..76c1f24e 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/PoptipBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/PoptipBaseStyle.xaml
@@ -12,7 +12,7 @@
-
+
From 35c43cabf1616c3007df8414179f2c4a8a5349c0 Mon Sep 17 00:00:00 2001
From: Mahdi
Date: Sun, 29 Dec 2019 18:50:32 +0330
Subject: [PATCH 07/11] fix #281
---
.../Themes/Styles/Base/TextBoxBaseStyle.xaml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/TextBoxBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/TextBoxBaseStyle.xaml
index 88975e61..b2179bd3 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/TextBoxBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/TextBoxBaseStyle.xaml
@@ -76,7 +76,7 @@
-
+
@@ -105,7 +105,7 @@
-
+
@@ -157,7 +157,7 @@
-
+
@@ -217,7 +217,7 @@
-
+
From efbe02c79f7d6e82dbb1031e918b86797b665546 Mon Sep 17 00:00:00 2001
From: Jinhua Chen
Date: Fri, 3 Jan 2020 14:18:15 +0800
Subject: [PATCH 08/11] close 283
---
.../Controls/NumericUpDownDemoCtl.xaml | 2 +
.../Controls/Input/NumericUpDown.cs | 33 +++++++++++-
.../Styles/Base/NumericUpDownBaseStyle.xaml | 52 +++++++++++++------
3 files changed, 70 insertions(+), 17 deletions(-)
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml
index 77fb878d..5036e772 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml
@@ -9,6 +9,7 @@
+
@@ -18,6 +19,7 @@
+
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
index 46a9ce1f..dbce3b48 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
@@ -31,18 +31,28 @@ namespace HandyControl.Controls
{
CommandBindings.Add(new CommandBinding(ControlCommands.Prev, (s, e) =>
{
+ if (IsReadOnly)
+ return;
+
Value += Increment;
_textBox.Text = CurrentText;
_textBox.Select(_textBox.Text.Length, 0);
}));
CommandBindings.Add(new CommandBinding(ControlCommands.Next, (s, e) =>
{
+ if (IsReadOnly)
+ return;
+
+
Value -= Increment;
_textBox.Text = CurrentText;
_textBox.Select(_textBox.Text.Length, 0);
}));
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
{
+ if (IsReadOnly)
+ return;
+
SetCurrentValue(ValueProperty, ValueBoxes.Double0Box);
_textBox.Text = string.Empty;
}));
@@ -106,6 +116,9 @@ namespace HandyControl.Controls
private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
{
+ if (IsReadOnly)
+ return;
+
if (e.Key == Key.Up)
{
Value += Increment;
@@ -122,7 +135,7 @@ namespace HandyControl.Controls
{
base.OnMouseWheel(e);
- if (_textBox.IsFocused)
+ if (_textBox.IsFocused&&IsReadOnly==false)
{
Value += e.Delta > 0 ? Increment : -Increment;
_textBox.Text = CurrentText;
@@ -359,9 +372,25 @@ namespace HandyControl.Controls
public bool ShowClearButton
{
get => (bool) GetValue(ShowClearButtonProperty);
- set => SetValue(ShowClearButtonProperty, value);
+ set => SetValue(ShowClearButtonProperty, value);
}
+ ///
+ /// 获取或设置一个值,该值指示NumericUpDown是否只读。
+ ///
+ public bool IsReadOnly
+ {
+ get => (bool)GetValue(IsReadOnlyProperty);
+ set => SetValue(IsReadOnlyProperty, value);
+ }
+
+ ///
+ /// 标识 IsReadOnly 依赖属性。
+ ///
+ public static readonly DependencyProperty IsReadOnlyProperty =
+ DependencyProperty.Register(nameof(IsReadOnly), typeof(bool), typeof(NumericUpDown), new PropertyMetadata(default(bool)));
+
+
public Func> VerifyFunc { get; set; }
public virtual bool VerifyData()
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/NumericUpDownBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/NumericUpDownBaseStyle.xaml
index e41e3429..c69f0993 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/NumericUpDownBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/NumericUpDownBaseStyle.xaml
@@ -35,9 +35,9 @@
-
-
-
+
+
+
@@ -53,6 +53,10 @@
+
+
+
+
@@ -75,9 +79,9 @@
-
-
-
+
+
+
@@ -91,6 +95,10 @@
+
+
+
+
@@ -110,9 +118,9 @@
-
-
-
+
+
+
@@ -126,6 +134,10 @@
+
+
+
+
@@ -169,10 +181,10 @@
-
+
-
-
+
+
@@ -183,10 +195,15 @@
+
+
+
+
+
@@ -231,10 +248,10 @@
-
+
-
-
+
+
@@ -245,10 +262,15 @@
+
+
+
+
+
From e109f73ac312c981358fdbe03f9c3ccc5b778fee Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sun, 5 Jan 2020 20:45:57 +0800
Subject: [PATCH 09/11] Update NumericUpDown.cs
---
.../Controls/Input/NumericUpDown.cs | 30 ++++++++-----------
1 file changed, 12 insertions(+), 18 deletions(-)
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
index dbce3b48..eac6fd1a 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
@@ -31,8 +31,7 @@ namespace HandyControl.Controls
{
CommandBindings.Add(new CommandBinding(ControlCommands.Prev, (s, e) =>
{
- if (IsReadOnly)
- return;
+ if (IsReadOnly) return;
Value += Increment;
_textBox.Text = CurrentText;
@@ -40,9 +39,7 @@ namespace HandyControl.Controls
}));
CommandBindings.Add(new CommandBinding(ControlCommands.Next, (s, e) =>
{
- if (IsReadOnly)
- return;
-
+ if (IsReadOnly) return;
Value -= Increment;
_textBox.Text = CurrentText;
@@ -50,8 +47,7 @@ namespace HandyControl.Controls
}));
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
{
- if (IsReadOnly)
- return;
+ if (IsReadOnly) return;
SetCurrentValue(ValueProperty, ValueBoxes.Double0Box);
_textBox.Text = string.Empty;
@@ -116,8 +112,7 @@ namespace HandyControl.Controls
private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
{
- if (IsReadOnly)
- return;
+ if (IsReadOnly) return;
if (e.Key == Key.Up)
{
@@ -135,7 +130,7 @@ namespace HandyControl.Controls
{
base.OnMouseWheel(e);
- if (_textBox.IsFocused&&IsReadOnly==false)
+ if (_textBox.IsFocused && !IsReadOnly)
{
Value += e.Delta > 0 ? Increment : -Increment;
_textBox.Text = CurrentText;
@@ -375,22 +370,21 @@ namespace HandyControl.Controls
set => SetValue(ShowClearButtonProperty, value);
}
+ ///
+ /// 标识 IsReadOnly 依赖属性。
+ ///
+ public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register(
+ "IsReadOnly", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(ValueBoxes.FalseBox));
+
///
/// 获取或设置一个值,该值指示NumericUpDown是否只读。
///
public bool IsReadOnly
{
- get => (bool)GetValue(IsReadOnlyProperty);
+ get => (bool) GetValue(IsReadOnlyProperty);
set => SetValue(IsReadOnlyProperty, value);
}
- ///
- /// 标识 IsReadOnly 依赖属性。
- ///
- public static readonly DependencyProperty IsReadOnlyProperty =
- DependencyProperty.Register(nameof(IsReadOnly), typeof(bool), typeof(NumericUpDown), new PropertyMetadata(default(bool)));
-
-
public Func> VerifyFunc { get; set; }
public virtual bool VerifyData()
From 56eba2fed98b42550a625229fdaa8e2acb43458a Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sun, 5 Jan 2020 21:45:50 +0800
Subject: [PATCH 10/11] modified doc
uniform doc structure
---
.../native_controls/image/index.md | 22 ++---
.../native_controls/label/index.md | 97 +++++++++----------
.../native_controls/listBox/index.md | 81 +++++++++-------
3 files changed, 97 insertions(+), 103 deletions(-)
diff --git a/doc/source/handycontrol/native_controls/image/index.md b/doc/source/handycontrol/native_controls/image/index.md
index d11560c0..85764b53 100644
--- a/doc/source/handycontrol/native_controls/image/index.md
+++ b/doc/source/handycontrol/native_controls/image/index.md
@@ -2,27 +2,17 @@
title: Image图片
---
-在`HandyControl`中,对应原生的`Image`控件,仅仅提供了一个默认的控件样式,并未提供特殊样式,对于个性化定制,需要使用者自行定制
+在`HandyControl`中,对应原生的`Image`控件,仅仅提供了一个默认的控件样式,并未提供特殊样式,对于个性化定制,需要使用者自行定制。
-默认样式定义:
-
-```
-
-```
-
-案例:
-
-```
+{% note info no-icon %}
+用例:
+{% code %}
-```
+{% endcode %}

+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/label/index.md b/doc/source/handycontrol/native_controls/label/index.md
index 7d37086a..25b65927 100644
--- a/doc/source/handycontrol/native_controls/label/index.md
+++ b/doc/source/handycontrol/native_controls/label/index.md
@@ -4,87 +4,84 @@ title: Lable标签
# LabelBaseStyle
-Label标签 默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用,
+Label标签 默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
-具体源码见:[LabelBaseStyle.xaml]( https://github.com/HandyOrg/HandyControl/blob/master/src/Shared/HandyControl_Shared/Themes/Styles/Base/LabelBaseStyle.xaml )
-
-使用如下:
-
-```
-
-```
-
-案例:
-
-```
+{% note info no-icon %}
+用例:
+{% code %}
-```
+{% endcode %}

-# LabelPrimary
+{% endnote %}
-Label标签 主样式
+# LabelPrimary : LabelBaseStyle
-案例:
+主样式
-```
-
-```
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}

-# LabelSuccess
+{% endnote %}
-Label标签 成功类型样式
+# LabelSuccess : LabelBaseStyle
-案例:
+成功类型样式
-```
-
-```
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}

-# LabelInfo
+{% endnote %}
-Label标签 信息类型样式
+# LabelInfo : LabelBaseStyle
-案例:
+信息类型样式
-```
-
-```
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}

-# LabelWarning
+{% endnote %}
-Label标签 警告类型样式
+# LabelWarning : LabelBaseStyle
-案例:
+警告类型样式
-```
-
-```
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}

-# LabelDanger
+{% endnote %}
-Label标签 危险类型样式
+# LabelDanger : LabelBaseStyle
-```
-
-```
+危险类型样式
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}

+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/listBox/index.md b/doc/source/handycontrol/native_controls/listBox/index.md
index 7c897e06..29de370d 100644
--- a/doc/source/handycontrol/native_controls/listBox/index.md
+++ b/doc/source/handycontrol/native_controls/listBox/index.md
@@ -4,26 +4,25 @@ title: ListBox 列表框
# ListBoxBaseStyle
- ListBox默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用,
+ ListBox默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
-样式源码见[ListBoxBaseStyle.xaml](https://github.com/HandyOrg/HandyControl/blob/master/src/Shared/HandyControl_Shared/Themes/Styles/Base/ListBoxBaseStyle.xaml )。
-
-案例:
-
-```
-
+{% note info no-icon %}
+用例:
+{% code %}
-```
+{% endcode %}

-# ListBoxCustom
+{% endnote %}
-ListBox列表Custom样式,该样式保留了Listbox的基本属性样式,而数据显示样式由当前用户自定义,实现个性化定制
+# ListBoxCustom : ListBoxBaseStyle
-案例:
+ListBox列表Custom样式,该样式保留了Listbox的基本属性样式,而数据显示样式由当前用户自定义,实现个性化定制。
-```
+{% note info no-icon %}
+用例:
+{% code %}
@@ -37,20 +36,20 @@ ListBox列表Custom样式,该样式保留了Listbox的基本属性样式,而
-```
-
-
+{% endcode %}

-# WrapPanelHorizontalListBox
+{% endnote %}
-ListBox列表显示布局容器为WrapPanel,水平方向显示样式
+# WrapPanelHorizontalListBox : ListBoxCustom
-案例:
+布局容器为WrapPanel,水平方向显示样式。
-```
-
@@ -63,17 +62,19 @@ ListBox列表显示布局容器为WrapPanel,水平方向显示样式
-```
+{% endcode %}

-# WrapPanelVerticalListBox
+{% endnote %}
-ListBox列表显示布局容器为WrapPanel,垂直方向显示样式
+# WrapPanelVerticalListBox : ListBoxCustom
-案例:
+布局容器为WrapPanel,垂直方向显示样式。
-```
+{% note info no-icon %}
+用例:
+{% code %}
@@ -87,17 +88,19 @@ ListBox列表显示布局容器为WrapPanel,垂直方向显示样式
-```
+{% endcode %}

-# StackPanelHorizontalListBox
+{% endnote %}
-ListBox列表显示布局容器为StackPanel,水平方向显示样式
+# StackPanelHorizontalListBox : ListBoxCustom
-案例:
+布局容器为StackPanel,水平方向显示样式。
-```
+{% note info no-icon %}
+用例:
+{% code %}
@@ -111,17 +114,19 @@ ListBox列表显示布局容器为StackPanel,水平方向显示样式
-```
+{% endcode %}

-# StackPanelVerticalListBox
+{% endnote %}
-ListBox列表显示布局容器为StackPanel,垂直方向显示样式
+# StackPanelVerticalListBox : ListBoxCustom
-案例:
+布局容器为StackPanel,垂直方向显示样式。
-```
+{% note info no-icon %}
+用例:
+{% code %}
@@ -135,6 +140,8 @@ ListBox列表显示布局容器为StackPanel,垂直方向显示样式
-```
+{% endcode %}
-
\ No newline at end of file
+
+
+{% endnote %}
\ No newline at end of file
From cef6fd433ef5a258ba70bb501fa9b203638b53c8 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sun, 5 Jan 2020 22:31:29 +0800
Subject: [PATCH 11/11] modified doc
uniform doc structure
---
.../native_controls/label/index.md | 2 +-
.../native_controls/listView/index.md | 14 ++--
.../native_controls/menu/index.md | 73 ++-----------------
.../native_controls/passwordBox/index.md | 39 +++++-----
.../native_controls/progressBar/index.md | 36 ++++-----
5 files changed, 49 insertions(+), 115 deletions(-)
diff --git a/doc/source/handycontrol/native_controls/label/index.md b/doc/source/handycontrol/native_controls/label/index.md
index 25b65927..cbd200ed 100644
--- a/doc/source/handycontrol/native_controls/label/index.md
+++ b/doc/source/handycontrol/native_controls/label/index.md
@@ -4,7 +4,7 @@ title: Lable标签
# LabelBaseStyle
-Label标签 默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+Label标签默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
{% note info no-icon %}
用例:
diff --git a/doc/source/handycontrol/native_controls/listView/index.md b/doc/source/handycontrol/native_controls/listView/index.md
index 308ecd17..10c9d1cb 100644
--- a/doc/source/handycontrol/native_controls/listView/index.md
+++ b/doc/source/handycontrol/native_controls/listView/index.md
@@ -2,11 +2,11 @@
title: ListView 列表视图
---
-`HandyControl`中仅仅提供了一个默认的`ListView`的资源样式,可根据个人需求,自行定义
+`HandyControl`中仅提供了一个默认的`ListView`样式,可根据个人需求,自行定义。
-# 案例
-
-```
+{% note info no-icon %}
+用例:
+{% code %}
@@ -16,8 +16,8 @@ title: ListView 列表视图
-```
+{% endcode %}
+
-
-
\ No newline at end of file
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/menu/index.md b/doc/source/handycontrol/native_controls/menu/index.md
index 33edb44e..28d0237f 100644
--- a/doc/source/handycontrol/native_controls/menu/index.md
+++ b/doc/source/handycontrol/native_controls/menu/index.md
@@ -4,79 +4,20 @@ title: Menu 菜单
# MenuBaseStyle
-`HandyControl`中的菜单默认样式,一般不建议直接使用,而是选择继承,便于个人自定义风格
+菜单默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
-样式
-
-```xml
-
-
-```
-
-使用
-
-```
-