Force IDataErrorInfo validation

前端 未结 2 633
渐次进展
渐次进展 2021-02-19 06:33

I have two controls on some panel: textbox and combobox:



        
相关标签:
2条回答
  • 2021-02-19 06:56

    Just raise the NotifyPropertyChanged event for the property you want to validate or if you are in .NET 4.5 or Silverlight 4 use the INotityDataErrorInfo.

    0 讨论(0)
  • 2021-02-19 06:58

    Worth remembering also that you can raise NotifyPropertyChanged with String.Empty property. This will force validation of all properties at that level. Can be useful at times.

    0 讨论(0)
提交回复
热议问题