How could I create a custom behavior with datavalidation in wpf?
I want to make a WPF control that will perfor开发者_开发问答m a custom behavior when validation fails (IE turn blue or change an arbitrary DP on the control).
You could add validation visual states to the control or apply a special ErrorTemplate these could take care of visual requirements such as turning blue.
Setting a property or calling a method could be done by subscribing to the Error event of the Validation class.
精彩评论