fix: fix NumericUpDownBase validation propagation.

This commit is contained in:
rabbitism
2024-07-27 14:16:28 +08:00
parent a92e68269f
commit 2111b72bae
3 changed files with 19 additions and 1 deletions

View File

@@ -41,6 +41,7 @@
Width="300"
u:FormItem.Label="Email"
Text="{Binding Email}" />
<u:NumericDoubleUpDown Value="{Binding Number}" u:FormItem.Label="Number" Width="300"/>
</u:FormGroup>
<u:FormItem Label="Please select a Date">
<CalendarDatePicker SelectedDate="{Binding Date}" />

View File

@@ -24,6 +24,14 @@ public partial class DataModel : ObservableObject
get=>_name;
set => SetProperty(ref _name, value);
}
private double _number;
[Range(0.0, 10.0)]
public double Number
{
get => _number;
set => SetProperty(ref _number, value);
}
private string _email;