How to update multibinding manually
For a multibinding, the binding expression is a MultiBindingExpression
, which inherits from BindingExpressionBase
, but not from BindingExpression
. So GetBindingExpression
returns null for a multibinding. Instead you can use BindingOperations.GetMultiBindingExpression
:
MultiBindingExpression b = BindingOperations.GetMultiBindingExpression(colorRectangle, Rectangle.FillProperty);