private bool RemoveFromGroupDirectly(CollectionViewGroupInternal group, object item) { int index = group.Remove(item, true); if (index < 0) { return(true); } this.OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item, index)); return(false); }
private void RemoveEmptyGroup(CollectionViewGroupInternal group) { CollectionViewGroupInternal parent = group.Parent; if (parent == null) { return; } GroupDescription groupBy = parent.GroupBy; if (parent.ProtectedItems.IndexOf((object)group) < groupBy.GroupNames.Count) { return; } parent.Remove((object)group, false); }