WPF:我可以迫使一个窗口重新评估其所有的绑定和验证的? [英] WPF: Can I force a window to re-evaluate all of its bindings and validations?

查看:273
本文介绍了WPF:我可以迫使一个窗口重新评估其所有的绑定和验证的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以强制窗口重新评估其所有的绑定和验证的?

Can I force a window to re-evaluate all of its bindings and validations?

有关某种原因,它似乎是一个奇怪的局面:忽略INotifyPropertyChanged.PropertyChanged和我在寻找一个变通使用,直到我找到真正的原因。

For some reason it seems to be ignoring the INotifyPropertyChanged.PropertyChanged in one weird situation and I'm looking for a work-around to use until I find the real cause.

推荐答案

提高的PropertyChanged 的String.Empty 作为属性名称。这将导致所有绑定的对象重新读取其全部绑定。

Raise PropertyChanged with String.Empty as the property name. This will cause all bindings in the object to reread all its bindings.

如果您有约束力的问题,不要忘记检查你的输出窗口绑定错误

If you are having binding issues dont forget to check your Output window for binding errors

这篇关于WPF:我可以迫使一个窗口重新评估其所有的绑定和验证的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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