diff --git a/README-cn.md b/README-cn.md
index d0a470f5..0c95a29d 100644
--- a/README-cn.md
+++ b/README-cn.md
@@ -55,6 +55,7 @@
+
## Backers
diff --git a/README.md b/README.md
index 1a2ccc4b..28263db4 100644
--- a/README.md
+++ b/README.md
@@ -55,6 +55,7 @@
+
## Backers
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml
index b12fe5f4..ccb95675 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/Base/TreeViewBaseStyle.xaml
@@ -53,10 +53,10 @@
-
+
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml
index ccebf3aa..e09deb85 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Controls/NumericUpDownDemoCtl.xaml
@@ -15,7 +15,7 @@
-
+
diff --git a/src/Shared/HandyControlDemo_Shared/UserControl/Main/MainWindowContent.xaml b/src/Shared/HandyControlDemo_Shared/UserControl/Main/MainWindowContent.xaml
index 28866da5..ebe732ab 100644
--- a/src/Shared/HandyControlDemo_Shared/UserControl/Main/MainWindowContent.xaml
+++ b/src/Shared/HandyControlDemo_Shared/UserControl/Main/MainWindowContent.xaml
@@ -13,7 +13,7 @@
-
+
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
index 28dbba39..cc544656 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
@@ -153,9 +153,11 @@ namespace HandyControl.Controls
}
}
- private string CurrentText => DecimalPlaces.HasValue
- ? Value.ToString($"#0.{new string('0', DecimalPlaces.Value)}")
- : Value.ToString("#0");
+ private string CurrentText => string.IsNullOrWhiteSpace(ValueFormat)
+ ? DecimalPlaces.HasValue
+ ? Value.ToString($"#0.{new string('0', DecimalPlaces.Value)}")
+ : Value.ToString("#0")
+ : Value.ToString(ValueFormat);
protected virtual void OnValueChanged(FunctionEventArgs e) => RaiseEvent(e);
@@ -318,6 +320,21 @@ namespace HandyControl.Controls
set => SetValue(DecimalPlacesProperty, value);
}
+ ///
+ /// 指示要显示的数字的格式
+ ///
+ public static readonly DependencyProperty ValueFormatProperty = DependencyProperty.Register(
+ "ValueFormat", typeof(string), typeof(NumericUpDown), new PropertyMetadata(default(string)));
+
+ ///
+ /// 指示要显示的数字的格式,这将会覆盖 属性
+ ///
+ public string ValueFormat
+ {
+ get => (string) GetValue(ValueFormatProperty);
+ set => SetValue(ValueFormatProperty, value);
+ }
+
///
/// 是否显示上下调值按钮
///
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/TreeViewBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/TreeViewBaseStyle.xaml
index 336e566b..8c3f9c19 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/TreeViewBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/TreeViewBaseStyle.xaml
@@ -53,10 +53,10 @@
-
+
-
+