diff --git a/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
index 0b5c639d..70a36ac9 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/CheckComboBox/CheckComboBox.cs
@@ -188,7 +188,7 @@ namespace HandyControl.Controls
var isError = !result.Data;
if (isError)
{
- SetCurrentValue(IsErrorProperty, true);
+ SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox);
SetCurrentValue(ErrorStrProperty, result.Message);
}
else
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs
index d09a45ab..c5104147 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/ComboBox.cs
@@ -360,7 +360,7 @@ namespace HandyControl.Controls
var isError = !result.Data;
if (isError)
{
- SetCurrentValue(IsErrorProperty, true);
+ SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox);
SetCurrentValue(ErrorStrProperty, result.Message);
}
else
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs b/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs
index 1abfda75..4f2dca85 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/DatePicker.cs
@@ -153,9 +153,21 @@ namespace HandyControl.Controls
}
}
- IsError = !result.Data;
- ErrorStr = result.Message;
- return result.Data;
+ var isError = !result.Data;
+ if (isError)
+ {
+ SetCurrentValue(IsErrorProperty, true);
+ SetCurrentValue(ErrorStrProperty, result.Message);
+ }
+ else
+ {
+ isError = Validation.GetHasError(this);
+ if (isError)
+ {
+ SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent);
+ }
+ }
+ return !isError;
}
}
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
index 210257f6..ab2247d8 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/NumericUpDown.cs
@@ -120,7 +120,7 @@ namespace HandyControl.Controls
Value = 0;
SetCurrentValue(ErrorStrProperty, string.Empty);
- SetCurrentValue(IsErrorProperty, false);
+ SetCurrentValue(IsErrorProperty, ValueBoxes.FalseBox);
}
else if (double.TryParse(_textBox.Text, out var value))
{
@@ -129,7 +129,7 @@ namespace HandyControl.Controls
if (Validation.GetHasError(this))
{
SetCurrentValue(ErrorStrProperty, Validation.GetErrors(this)[0].ErrorContent);
- SetCurrentValue(IsErrorProperty, true);
+ SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox);
}
}
@@ -513,7 +513,7 @@ namespace HandyControl.Controls
}
SetCurrentValue(ErrorStrProperty, result.Message);
- SetCurrentValue(IsErrorProperty, !result.Data);
+ SetCurrentValue(IsErrorProperty, ValueBoxes.BooleanBox(!result.Data));
return result.Data;
}
}
diff --git a/src/Shared/HandyControl_Shared/Controls/Input/TextBox.cs b/src/Shared/HandyControl_Shared/Controls/Input/TextBox.cs
index 01001985..6394f461 100644
--- a/src/Shared/HandyControl_Shared/Controls/Input/TextBox.cs
+++ b/src/Shared/HandyControl_Shared/Controls/Input/TextBox.cs
@@ -115,7 +115,7 @@ namespace HandyControl.Controls
var isError = !result.Data;
if (isError)
{
- SetCurrentValue(IsErrorProperty, true);
+ SetCurrentValue(IsErrorProperty, ValueBoxes.TrueBox);
SetCurrentValue(ErrorStrProperty, result.Message);
}
else
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/DatePickerBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/DatePickerBaseStyle.xaml
index d6b4a5a2..b9090c1b 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/DatePickerBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/DatePickerBaseStyle.xaml
@@ -34,6 +34,7 @@
+
@@ -343,6 +344,7 @@