I defined an attached dependency property of collection type:
var selSrcPropMetadata = new PropertyMetadata(SelectionSourceChanged);
SelectionSourceProperty = DependencyProperty.RegisterAttached("SelectionSource",
typeof(IEnumerable),
typeof(SelectionHelper),
selSrcPropMetadata);
Property change callback works only once when binding is applied.
But how can I get the notifications about bound collection changes?
In SelectionSourceChanged, check if the new source value implements INotifyCollectionChanged. If it does, cast it and subscribe to its CollectionChanged event.