Exemplo n.º 1
0
        /// <summary>
        ///     This method is invoked when the Items property changes.
        /// </summary>
        protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
        {
            switch (e.Action)
            {
            case NotifyCollectionChangedAction.Remove:
                ParentTreeView?.ClearObsoleteItems(e.OldItems);
                break;

            case NotifyCollectionChangedAction.Reset:
            case NotifyCollectionChangedAction.Replace:
            case NotifyCollectionChangedAction.Add:
            case NotifyCollectionChangedAction.Move:
                break;

            default:
                throw new NotSupportedException();
            }
        }