In This Article

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 true then the items in this collection are also visual children; otherwise false.

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.

public ILogicalParent Parent { get; }

Property Value

ILogicalParent:

The logical parent.

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 should be inserted.

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

Extension Methods