OnOwnerItemsItemsChanged() private method

private OnOwnerItemsItemsChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void
sender object
e NotifyCollectionChangedEventArgs
return void
Beispiel #1
0
        void InvokeItemsChanged(object o, NotifyCollectionChangedEventArgs e)
        {
            switch (e.Action)
            {
            case NotifyCollectionChangedAction.Add:
                SetLogicalParent(native, e.NewItems);
                break;

            case NotifyCollectionChangedAction.Remove:
                SetLogicalParent(IntPtr.Zero, e.OldItems);
                break;

            case NotifyCollectionChangedAction.Replace:
                SetLogicalParent(IntPtr.Zero, e.OldItems);
                SetLogicalParent(native, e.NewItems);
                break;
            }

            ItemContainerGenerator.OnOwnerItemsItemsChanged(o, e);
            if (!itemsIsDataBound)
            {
                OnItemsChanged(e);
            }
        }