In This Article

LogicalTreeNodeBase Class

Represents a base disposable Object that implements ILogicalTreeNode.

public abstract class LogicalTreeNodeBase : DisposableObject, IDisposable, ILogicalTreeNode
Inheritance:
Object MarshalByRefObject DisposableObject Object
Derived:
MarkupLabelElement UIElement
Implements:
IDisposable ILogicalTreeNode

Constructors

LogicalTreeNodeBase()

Initializes a new instance of the LogicalTreeNodeBase class.

public LogicalTreeNodeBase()

Remarks

The default constructor initializes all fields to their default values.

Methods

CreateChildren()

Invoked when the collection of child elements is to be created.

protected virtual IList CreateChildren()

Returns

IList:

The IList that should be assigned to the Children property.

Remarks

By default no child collection is created.

OnParentChanged()

Invoked when logical parent is changed. This is invoked after the parent has changed, and the purpose is to allow elements to perform actions based on the changed parent.

protected virtual void OnParentChanged()

Explicit Interface Implementations

ILogicalTreeNode.Children

Gets the collection of child objects.

IList ILogicalTreeNode.Children { get; }

Returns

IList:

The collection of child objects.

ILogicalTreeNode.FindAncestor(Type)

Loops up the parent chain to locate an ancestor of the specified Type.

object ILogicalTreeNode.FindAncestor(Type type)
Parameter Type Description
type Type

The Type of ancestor to located.

Returns

Object:

The Object ancestor that matches the Type.

ILogicalTreeNode.GetCommonAncestor(ILogicalTreeNode)

Gets the common ancestor of the two object.

ILogicalTreeNode ILogicalTreeNode.GetCommonAncestor(ILogicalTreeNode value)
Parameter Type Description
value ILogicalTreeNode

The ILogicalTreeNode to compare.

Returns

ILogicalTreeNode:

The ILogicalTreeNode that is a common ancestor of both objects; otherwise null.

ILogicalTreeNode.IsAncestorOf(ILogicalTreeNode)

Gets whether the object is an ancestor to the specified object.

bool ILogicalTreeNode.IsAncestorOf(ILogicalTreeNode value)
Parameter Type Description
value ILogicalTreeNode

The ILogicalTreeNode to compare.

Returns

Boolean:

true if the object is an ancestor of the specified object; otherwise, false.

ILogicalTreeNode.IsDescendantOf(ILogicalTreeNode)

Gets whether the object is a descendant of the specified object.

bool ILogicalTreeNode.IsDescendantOf(ILogicalTreeNode value)
Parameter Type Description
value ILogicalTreeNode

The ILogicalTreeNode to compare.

Returns

Boolean:

true if the object is a descendant of the specified object; otherwise, false.

ILogicalTreeNode.Parent

Gets or sets the object that is parent to this object.

ILogicalTreeNode ILogicalTreeNode.Parent { get; set; }

Returns

ILogicalTreeNode:

The object that is parent to this object.

Remarks

The setter of this property is reserved for internal use only.

Inherited Members