阅读背景:

IDataErrorInfo是什么?它如何与WPF一起工作?

来源:互联网 

While working on some custom validators in WPF, one of my co-workers pointed me out the IDataErrorInfo. I have a sample view in XAML that has a textbox and a button. Based on the value in the textbox I would like the button to be either enabled or disabled. My co-worker suggested that extending the IDataErrorInfo in the presentor of my view and writing custom logic for the 'Item' and 'Error' properties would solve my problem. Before I could incorporate this in my code, I thought I should understand how IDataError info works and what is it about implementing this interface that provides the necessary hooks to trigger the custom validation logic? Some help with this concept would be extremely helpful!While working on some custom validators in WPF,




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: