How to implement INotifyDataErrorInfo in WPF 4.5? [closed]

人走茶凉 提交于 2019-11-26 22:45:20

问题


I realized that appears this interface in .NET Framework 4.5

I was looking first for about how to implemented in Silverlight (I can imagine that it's implemented in the same way), but I can't find a compact demo of this new interface. Is it possible to show how can I use it?

I really want to find a small demo to understand it


回答1:


Beside the very detailed description on MSDN about the Silverlight version of INotifyDataErrorInfo

There are already some blog posts with samples how to use/implement it in WPF 4.5:

  • WPF 4.5 – Asynchronous validation (original link no longer working) Wayback Link
  • WPF 4.5 – Part 1 : Asynchronous data validation (the author has a nice series about the new fetaures in WPF 4.5)



回答2:


The PRISM library has a very good example implementation in the MVVM RI sample, the class named DomainObject implements both INotifyPropertyChanged and INotifyDataErrorInfo.

It is a SL version but it now compiles with .NET 4.5



来源:https://stackoverflow.com/questions/9950128/how-to-implement-inotifydataerrorinfo-in-wpf-4-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!