LogicalChildrenCollection<T> Class
Provides a DeferrableObservableCollection<T> that is capable of adding/removing the logical parent, and optionally the visual parent, of the items in the collection.
public class LogicalChildrenCollection<T> : DeferrableObservableCollection<T>
- Type Parameters:
-
T
-The type of items.
- Inheritance:
- object Collection<T> ObservableCollection<T> DeferrableObservableCollection<T> object
- Derived:
- CircularPointerCollection CircularRangeCollection CircularScaleCollection CircularTickCollection CircularTickSetCollection LinearPointerCollection LinearRangeCollection LinearScaleCollection LinearTickCollection LinearTickSetCollection
Constructors
LogicalChildrenCollection(ILogicalParent)
Initializes a new instance of the LogicalChildrenCollection<T> class.
public LogicalChildrenCollection(ILogicalParent parent)
Parameter | Type | Description |
---|---|---|
parent | ILogicalParent | The parent. |
LogicalChildrenCollection(ILogicalParent, bool)
Initializes a new instance of the LogicalChildrenCollection<T> class.
public LogicalChildrenCollection(ILogicalParent parent, bool areVisualChildren)
Parameter | Type | Description |
---|---|---|
parent | ILogicalParent | The parent. |
areVisualChildren | bool | if set to |
Remarks
If areVisualChildren
is set to true
and parent
implements
IVisualParent, then this collection will also call the IVisualParent methods when
items are added and removed from this collection.
Properties
Parent
Gets the logical parent of the items in this collection.
Methods
ClearItems()
Removes all items from the collection.
protected override void ClearItems()
InsertItem(int, T)
Inserts an item into the collection at the specified index.
protected override void InsertItem(int index, T item)
Parameter | Type | Description |
---|---|---|
index | int | The zero-based index at which |
item | T | The object to insert. |
RemoveItem(int)
Removes the item at the specified index of the collection.
protected override void RemoveItem(int index)
Parameter | Type | Description |
---|---|---|
index | int | The zero-based index of the element to remove. |
SetItem(int, T)
Replaces the element at the specified index.
protected override void SetItem(int index, T item)
Parameter | Type | Description |
---|---|---|
index | int | The zero-based index of the element to replace. |
item | T | The new value for the element at the specified index. |
Inherited Members
- DeferrableObservableCollection<T>.AddRange(IEnumerable<T>)
- DeferrableObservableCollection<T>.BeginUpdate()
- DeferrableObservableCollection<T>.EndUpdate()
- DeferrableObservableCollection<T>.OnCollectionChanged(NotifyCollectionChangedEventArgs)
- DeferrableObservableCollection<T>.OnPropertyChanged(PropertyChangedEventArgs)
- DeferrableObservableCollection<T>.ToArray()
- DeferrableObservableCollection<T>.IsDirty
- DeferrableObservableCollection<T>.IsPropertyChangeSuspended
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()