开发者

Silverlight: Should I be using IDataErrorInfo, INotifyDataErrorInfo, or both?

开发者 https://www.devze.com 2023-02-23 12:14 出处:网络
S开发者_如何学运维hould I be using IDataErrorInfo, INotifyDataErrorInfo, or both? If I use both, should I offer the same error in both or should I only offer sync errors from IDataErrorInfo and only

S开发者_如何学运维hould I be using IDataErrorInfo, INotifyDataErrorInfo, or both?

If I use both, should I offer the same error in both or should I only offer sync errors from IDataErrorInfo and only async errors from INotifyDataErrorInfo?


If you're working only in Silverlight, you should implement INotifyDataErrorInfo. From the documentation:

In general, new entity classes for Silverlight should implement INotifyDataErrorInfo for the added flexibility instead of implementing IDataErrorInfo.

However, if you want to share code with WPF, IDataErrorInfo is supported in both Silverlight and WPF.

0

精彩评论

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