WPF中的不同错误处理技术 [英] Different error handling techniques in WPF

查看:38
本文介绍了WPF中的不同错误处理技术的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



任何人都可以向我发送有关WPF中不同错误处理技术的良好链接吗?
(使用ValidationRule,ExceptionValidationRule,DataErrorValidationRule的WPF错误处理)

请发送链接(如果有).
谢谢..

解决方案

IDataErrorInfo是验证的最佳方法,考虑到您正在使用WPF的强大数据绑定功能.

我已经在博客中对此进行了解释,该博客将解释如何使用IDataErrorInfo接口,还包括一个CustomValidationRule来创建您自己的验证规则.

在这里是: http://tarundotnet.wordpress .com/2011/03/03/wpf-tutorial-how-to-use-idataerrorinfo-in-wpf/ [ http://www.codeproject.com/KB/WPF/wpfvalidation.aspx [ ^ ]

希望能有所帮助! :)


希望 [ ^ ]可能会为您提供帮助.

Hi,

Can anybody send me good links about different error handling techniques in WPF ??
(WPF Error Handling using ValidationRule, ExceptionValidationRule, DataErrorValidationRule)

Please send links if you have..
Thanks..

解决方案

IDataErrorInfo is the best approach for validation considering the fact that you are using the powerful data binding feature of WPF.

I have explained this in my blog which will explain how to use IDataErrorInfo interface and also included a CustomValidationRule to create your own validation rule.

Here it is : http://tarundotnet.wordpress.com/2011/03/03/wpf-tutorial-how-to-use-idataerrorinfo-in-wpf/[^]

You can also have a look at Paul Stovell''s post right here at CodeProject which discusses the same thing http://www.codeproject.com/KB/WPF/wpfvalidation.aspx[^]

Hope it helped! :)


Hope this[^] might help you.


这篇关于WPF中的不同错误处理技术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆