WPF: Can I make a window re-evaluate all its bindings and checks?

Can I make a window re-evaluate all its bindings and checks?

For some reason, he seems to be ignoring INotifyPropertyChanged.PropertyChanged in one weird situation, and I'm looking for work until I find the real reason.

+7
wpf binding
source share
2 answers

Raise PropertyChanged with String.Empty as the property name. This will call all the bindings in the object to re-read all its bindings.

If you have problems with binding, be sure to check the output window for binding errors

+5
source share

Unfortunately, I donโ€™t know how to make every binding in the window overestimate. Part of the problem is that most of the bindings are not declared in the window, but rather on the specific children of the window's DependencyObject.

You can use DependencyObject.InvalidateProperty to undo a single binding, but this must be done based on property by property. If there are only a few objects associated with them, you should use this to force their values.

Having said that, I would like to suggest finding out the reason - in the best case, this will be the best solution.

+8
source share

All Articles