OnItemChanged not called when trying to implement VirtualizingPanel in WPF
I am trying to implement my own VirtualWrapPanel in WPF.
I am implementing it like this:
public class VirtualWrapPanel : VirtualizingPanel, IScrollInfo
{
....
protected override void OnItemsChanged(object sender, ItemsChangedEventArgs args)
{
switch (args.Action)
{
case NotifyCollectionChangedAction.Remove:
case NotifyCollectionChangedAction.Replace:
case NotifyCollectionChangedAction.Move:
base.RemoveInternalChildRange(args.Position.Index, args.ItemUICount);
return;
}
}
}
but the OnItemsChanged method is never called, causing the control not to release objects ... Any ideas? thanks Jonathan
0
jonathan
source
to share