[英]Implement INotifyDataErrorInfo in WPF
I like how works INotifyDataErrorInfo in Silverlight. 我喜欢Silverlight中INotifyDataErrorInfo的工作方式。
But I realized that it does not exist in WPF. 但是我意识到它在WPF中不存在。 Are there another ways to implement validation in WPF?
还有其他方法可以在WPF中实施验证吗? I prefer not to use DataAnotations.
我不想使用DataAnotations。
您可以等待WPF 4.5 ,它将最终支持INotifyDataErrorInfo。
Use the IDataErrorInfo
wich is the same 使用
IDataErrorInfo
是一样的
Here a demo http://codeblitz.wordpress.com/2009/05/08/wpf-validation-made-easy-with-idataerrorinfo/ 这是一个演示http://codeblitz.wordpress.com/2009/05/08/wpf-validation-made-easy-with-idataerrorinfo/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.