I have an object that performs multiple calculations whenever any of is input values change.
There are a number of fields bound to the object in xaml. I am currently firing the propertychanged manually f开发者_开发技巧or each field however there are a number of properties affected by each update so this is getting tedious and messy.
Is there a way to update everything whenever PropertyChanged is fired regardless of the actual property?
If you call PropertyChanged(this, new PropertyChangedEventArgs(null))
once you're done with your calculations, all bindings bound to the obect will be updated at once. By specifying null
(empty string would also work), you're telling the binding engine "everything changed" so it will refresh all of its bindings against that object.
精彩评论