private void Remove(RowPresenter row) { Debug.Assert(row != null); if (_mappings != null) { _mappings.Remove(row.DataRow); } var parent = row.Parent; var index = IndexOf(row); RemoveAt(parent, index); DisposeRow(row); if (parent != null && parent.Children.Count == 0 && !PassesFilter(parent.DataRow)) { Remove(parent); } else { OnRowRemoved(parent, index); } row.Dispose(); }
protected virtual void DisposeRow(RowPresenter row) { row.Dispose(); }