
选项包括:System.String,System.Object,MyCustomObject,ISomeOtherShitThatDoesntHaveAnythingTodoWithValIDationWhatever
任何人都可以向我解释一个任意的可枚举对象如何在不对其结构做出任何假设的情况下通知错误吗?
解决方法 docs forINotifyDataErrorInfo提供了更多信息: The valIDation errors returned by the GetErrors method can be of any type. However,if you implement a custom error type,be sure to overrIDe the ToString method to return an error message. Silverlight uses this string in its default error reporting.
Custom error objects are useful when you provIDe custom error reporting in the user interface. For example,you can create a template for the reporting tooltip that binds to an ErrorLevel property in order to display warnings in yellow and critical errors in red.
GetErrors的Examples部分中有一个链接回到该文档:
For an example of an implementation of this method,see the
INotifyDataErrorInfoclass overvIEw.
我同意它不太清楚,但文件是……
总结以上是内存溢出为你收集整理的silverlight-4.0 – INotifyDataErrorInfo.GetErrors应返回什么类型的IEnumerable?全部内容,希望文章能够帮你解决silverlight-4.0 – INotifyDataErrorInfo.GetErrors应返回什么类型的IEnumerable?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)