DecimalPlaces为null时,使用值的默认文本格式,以支持显示小数。
This commit is contained in:
cuiliang committed 2020-12-08 14:59:08 +08:00
1 parent 0088422833
commit 7b62712f31
1 file changed
+1 -1
@@ -156,7 +156,7 @@ namespace HandyControl.Controls
private string CurrentText => string.IsNullOrWhiteSpace(ValueFormat)
? DecimalPlaces.HasValue
? Value.ToString($"#0.{new string('0', DecimalPlaces.Value)}")
: Value.ToString("#0")
: Value.ToString()
: Value.ToString(ValueFormat);
protected virtual void OnValueChanged(FunctionEventArgs<double> e) => RaiseEvent(e);