c# - this.RaisePropertyChanged ("")是什么意思?

标签 c# wpf idataerrorinfo

我在模型类中的 IDataErrorInfo 的实现部分中对此进行了编码,以便在错误清除后清除错误。

我不明白此处使用空字符串引发了哪个属性刷新?

if (raiseNotification)
                    this.RaisePropertyChanged("");

最佳答案

摘自MSDN :

The PropertyChanged event can indicate all properties on the object have changed by using either null or String.Empty as the property name in the PropertyChangedEventArgs.

在本例中,为 null、String.Empty 或 "":^)

关于c# - this.RaisePropertyChanged ("")是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21335581/

相关文章:

c# - 我们可以使用 UI 自动化来自动化远程机器吗

c# - 使用C#比较本地数据库的两个表

c# - 从 WPF ColorPicker 到矩形画笔的颜色?

wpf - 数据绑定(bind)如何避免 WPF 中的递归更新?

c# - 在 View 模型中检索 IDataErrorInfo 字符串结果

WPF 数据验证?有什么比 IDataErrorInfo 更好的吗?

c# - 将字符串转换为枚举,但枚举类型仅在运行时已知

c# - 垃圾收集器什么时候收集单例?

c# - DataGridTemplateColumn (ComboBox, DatePicker) 重置/清除并且不触发 AddingNewItem

c# - 在 ViewModel 实体上使用 DataAnnotation 进行 Prism IDataErrorInfo 验证