开发者

WPF Data Validation? Anything out there better than IDataErrorInfo?

Is there a preferred practice to do Data Validation from within your ViewModel?

Looking into it some people seem to prefer IDataErrorInfo and some prefer to roll out their own validation frameworks (http://www.codeproject.com/KB/WPF/wpf_custom_validation.aspx)?

I'm wondering what the "Best Practice" is for Data Validation? Is there something that is accepted by the community when it comes to adhering to the M-V-VM guidelines?

Oh, 开发者_开发技巧and an FYI, I'm using Prism as my MVVM framework, but I don't think it has any laid out code for Validation assistance.


You might use the Validation Framework of the .NET Framework. It can be used with PRISM or any other MVVM Framework. The BookLibrary sample application of the WPF Application Framework (WAF) shows how to use it together with WPF Binding.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜