I had a problem with the Binding
. The Rectangle.Fill
dependency property was bound to an ObservableCollection
with the converter. Although the ObservableCollection
implements INotifyCollectionChanged
, the binding was not updated. I managed, however, to solve this by attaching my delegation to the collection's change notification event and refreshing the binding manually:
void ColorsCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
BindingExpression b = colorRectangle.GetBindingExpression(Rectangle.FillProperty);
if (b != null)
b.UpdateTarget();
}
Lately, however, I changed the Binding
to MultiBinding
, and the above solution stopped working (the b
is null
). Is there a way to force the Multibinding
to update the target property?
Best regards -- Spook.