开发者

WPF Value Converter Trigger Reconvertion at custom event?

开发者 https://www.devze.com 2022-12-23 01:56 出处:网络
Is there any way to force 开发者_如何学Pythonwpf to run the value converter again on a specific event?You can force WPF to update a binding by calling BindingExpression.UpdateTarget (and, for certain

Is there any way to force 开发者_如何学Pythonwpf to run the value converter again on a specific event?


You can force WPF to update a binding by calling BindingExpression.UpdateTarget (and, for certain bindings, BindingExpression.UpdateSource). If the binding involves a converter, then the converter will run as part of that update.

To get the BindingExpression for a bound property, call BindingOperations.GetBindingExpression.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号