What is the best solution for not being able to use data binding on a ValidationRule property since ValiationRule is not a DependencyObject?
Below is an example of what I would like to do. I want to b开发者_运维知识库e able to validate the text in the TextBox against some other DependencyProperty.
<TextBox Name="myTextBox">
<TextBox.Text>
<Binding Path="MySource" UpdateSourceTrigger="PropertyChanged">
<base:EqualsRule Target="{Binding MyTarget}" />
</Binding>
</TextBox.Text>
</TextBox>
You could use Josh Smith's virtual branch approach.
精彩评论