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/border/index.md b/doc/source/handycontrol/native_controls/border/index.md
index 87ddb03a..e3551636 100644
--- a/doc/source/handycontrol/native_controls/border/index.md
+++ b/doc/source/handycontrol/native_controls/border/index.md
@@ -12,32 +12,32 @@ title: Border 边框
``` xml
-
+
-
+
-
+
-
+
-
+
-
+
@@ -45,6 +45,8 @@ title: Border 边框
```
+提示:新版本中使用的`BorderRegion`,有别于老版本使用样式`BorderRegionStyle`,由直角变更为圆角
+
# BorderVerticallySplitter
此样式使用1单位宽度的Border来分割横向排列的控件。
diff --git a/doc/source/handycontrol/native_controls/image/index.md b/doc/source/handycontrol/native_controls/image/index.md
index ca12ad62..85764b53 100644
--- a/doc/source/handycontrol/native_controls/image/index.md
+++ b/doc/source/handycontrol/native_controls/image/index.md
@@ -1,5 +1,18 @@
---
-title: 建设中
+title: Image图片
---
-建设中
\ No newline at end of file
+在`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 ca12ad62..cbd200ed 100644
--- a/doc/source/handycontrol/native_controls/label/index.md
+++ b/doc/source/handycontrol/native_controls/label/index.md
@@ -1,5 +1,87 @@
---
-title: 建设中
+title: Lable标签
---
-建设中
\ No newline at end of file
+# LabelBaseStyle
+
+Label标签默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# LabelPrimary : LabelBaseStyle
+
+主样式
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# LabelSuccess : LabelBaseStyle
+
+成功类型样式
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# LabelInfo : LabelBaseStyle
+
+信息类型样式
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# LabelWarning : LabelBaseStyle
+
+警告类型样式
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# 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 ca12ad62..29de370d 100644
--- a/doc/source/handycontrol/native_controls/listBox/index.md
+++ b/doc/source/handycontrol/native_controls/listBox/index.md
@@ -1,5 +1,147 @@
---
-title: 建设中
+title: ListBox 列表框
---
-建设中
\ No newline at end of file
+# ListBoxBaseStyle
+
+ ListBox默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# ListBoxCustom : ListBoxBaseStyle
+
+ListBox列表Custom样式,该样式保留了Listbox的基本属性样式,而数据显示样式由当前用户自定义,实现个性化定制。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+
+
+
+
+
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# WrapPanelHorizontalListBox : ListBoxCustom
+
+布局容器为WrapPanel,水平方向显示样式。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+
+
+
+
+
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# WrapPanelVerticalListBox : ListBoxCustom
+
+布局容器为WrapPanel,垂直方向显示样式。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+
+
+
+
+
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# StackPanelHorizontalListBox : ListBoxCustom
+
+布局容器为StackPanel,水平方向显示样式。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+
+
+
+
+
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# StackPanelVerticalListBox : ListBoxCustom
+
+布局容器为StackPanel,垂直方向显示样式。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+
+
+
+
+
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/listView/index.md b/doc/source/handycontrol/native_controls/listView/index.md
index ca12ad62..10c9d1cb 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`样式,可根据个人需求,自行定义。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+
+
+
+
+
+
+{% endcode %}
+
+
+
+{% 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 ca12ad62..28d0237f 100644
--- a/doc/source/handycontrol/native_controls/menu/index.md
+++ b/doc/source/handycontrol/native_controls/menu/index.md
@@ -1,5 +1,23 @@
---
-title: 建设中
+title: Menu 菜单
---
-建设中
\ No newline at end of file
+# MenuBaseStyle
+
+菜单默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/passwordBox/index.md b/doc/source/handycontrol/native_controls/passwordBox/index.md
index ca12ad62..0b72a68d 100644
--- a/doc/source/handycontrol/native_controls/passwordBox/index.md
+++ b/doc/source/handycontrol/native_controls/passwordBox/index.md
@@ -1,5 +1,45 @@
---
-title: 建设中
+title: PasswordBox 密码框
---
-建设中
\ No newline at end of file
+# PasswordBoxBaseStyle
+
+原生密码框默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+{% endcode %}
+
+
+
+{% endnote %}
+
+# PasswordBoxExtendBaseStyle : PasswordBoxBaseStyle
+
+原生密码框扩展默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+
+# PasswordBoxExtend : PasswordBoxExtendBaseStyle
+
+相对于原生密码框默认样式,它借助于附加属性可以实现标题、水印的功能。
+
+{% note info no-icon %}
+用例:
+{% code %}
+
+
+
+{% endcode %}
+
+
+
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/native_controls/progressBar/index.md b/doc/source/handycontrol/native_controls/progressBar/index.md
index ca12ad62..8f5ca2a7 100644
--- a/doc/source/handycontrol/native_controls/progressBar/index.md
+++ b/doc/source/handycontrol/native_controls/progressBar/index.md
@@ -1,5 +1,79 @@
---
-title: 建设中
+title: ProgressBar 进度条
---
-建设中
\ No newline at end of file
+# ProgressBarBaseStyle
+
+进度条默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
+
+# 其他样式
+
+`HandyControl`中自带的其他样式和效果,其中包含如下样式:
+
+| 样式Key | 用途 |父样式|
+| ------------------ | ---- ||
+| ProgressBarSuccess | 成功色进度条 |ProgressBarBaseStyle|
+| ProgressBarInfo | 提示色进度条 |ProgressBarBaseStyle|
+| ProgressBarWarning | 警告色进度条 |ProgressBarBaseStyle|
+| ProgressBarDanger | 危险色进度条 |ProgressBarBaseStyle|
+| ProgressBarStripeBaseStyle | 条纹进度条默认样式(不推荐直接使用) |-|
+| ProgressBarPrimaryStripe | 主题色条纹进度条 |ProgressBarStripeBaseStyle|
+| ProgressBarSuccessStripe | 成功色条纹进度条 |ProgressBarStripeBaseStyle|
+| ProgressBarInfoStripe | 信息色条纹进度条 |ProgressBarStripeBaseStyle|
+| ProgressBarWarningStripe | 警告色条纹进度条 |ProgressBarStripeBaseStyle|
+| ProgressBarDangerStripe | 危险色条纹进度条 |ProgressBarStripeBaseStyle|
+| ProgressBarFlat | 扁平风格 |-|
+
+案例:
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+效果:
+
+
+# 温馨提示
+
+对于颜色、圆角或其它自定义需求,可参考[进度条样式源码](https://github.com/HandyOrg/HandyControl/blob/master/src/Shared/HandyControl_Shared/Themes/Styles/ProgressBar.xaml)自行定义。
\ No newline at end of file
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..eac6fd1a 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
@@ -31,18 +31,24 @@ 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 +112,8 @@ namespace HandyControl.Controls
private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
{
+ if (IsReadOnly) return;
+
if (e.Key == Key.Up)
{
Value += Increment;
@@ -122,7 +130,7 @@ namespace HandyControl.Controls
{
base.OnMouseWheel(e);
- if (_textBox.IsFocused)
+ if (_textBox.IsFocused && !IsReadOnly)
{
Value += e.Delta > 0 ? Increment : -Increment;
_textBox.Text = CurrentText;
@@ -359,7 +367,22 @@ namespace HandyControl.Controls
public bool ShowClearButton
{
get => (bool) GetValue(ShowClearButtonProperty);
- set => SetValue(ShowClearButtonProperty, value);
+ 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);
+ set => SetValue(IsReadOnlyProperty, value);
}
public Func> VerifyFunc { get; set; }
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 @@
+
+
+
+
+
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 @@
-
+
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 @@
-
+