更新
This commit is contained in:
16
WPF/VaildationRules.md
Normal file
16
WPF/VaildationRules.md
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
```xaml
|
||||
<TextBox.Text>
|
||||
<Binding Path="FloorHeight" UpdateSourceTrigger="PropertyChanged">
|
||||
<Binding.ValidationRules>
|
||||
<valrules:RangeVaildationRule Max="100" Min="0" />
|
||||
</Binding.ValidationRules>
|
||||
</Binding>
|
||||
</TextBox.Text>
|
||||
```
|
||||
|
||||
```xaml
|
||||
<Window.DataContext>
|
||||
<local:FloorFinshesViewModel />
|
||||
</Window.DataContext>
|
||||
```
|
||||
Reference in New Issue
Block a user