Skip to main content

LogicalExtensions Class

Definition

Assembly:Avalonia.Base
Package:Avalonia

Provides extension methods for working with the logical tree.

public class LogicalExtensions

Inheritance: object -> LogicalExtensions

Methods

NameDescription
FindLogicalAncestorOfTypeNo summary available.
FindLogicalDescendantOfTypeNo summary available.
GetLogicalAncestorsEnumerates the ancestors of an Avalonia.LogicalTree.ILogical in the logical tree.
GetLogicalChildrenEnumerates the children of an Avalonia.LogicalTree.ILogical in the logical tree.
GetLogicalDescendantsEnumerates the descendants of an Avalonia.LogicalTree.ILogical in the logical tree.
GetLogicalParentGets the logical parent of an Avalonia.LogicalTree.ILogical.
GetLogicalSiblingsEnumerates the siblings of an Avalonia.LogicalTree.ILogical in the logical tree.
GetSelfAndLogicalAncestorsEnumerates an Avalonia.LogicalTree.ILogical and its ancestors in the logical tree.
GetSelfAndLogicalDescendantsEnumerates an Avalonia.LogicalTree.ILogical and its descendants in the logical tree.
IsLogicalAncestorOfTests whether an Avalonia.LogicalTree.ILogical is an ancestor of another logical.

FindLogicalAncestorOfType Method

public T FindLogicalAncestorOfType<T>(Avalonia.LogicalTree.ILogical logical, bool includeSelf)

Parameters

logical Avalonia.LogicalTree.ILogical

includeSelf bool

Type Parameters

T

Returns

T

FindLogicalDescendantOfType Method

public T FindLogicalDescendantOfType<T>(Avalonia.LogicalTree.ILogical logical, bool includeSelf)

Parameters

logical Avalonia.LogicalTree.ILogical

includeSelf bool

Type Parameters

T

Returns

T

GetLogicalAncestors Method

Enumerates the ancestors of an Avalonia.LogicalTree.ILogical in the logical tree.

public System.Collections.Generic.IEnumerable<Avalonia.LogicalTree.ILogical> GetLogicalAncestors(Avalonia.LogicalTree.ILogical logical)

Parameters

logical Avalonia.LogicalTree.ILogical

The logical.

Returns

System.Collections.Generic.IEnumerable<Avalonia.LogicalTree.ILogical>

The logical's ancestors.

GetLogicalChildren Method

Enumerates the children of an Avalonia.LogicalTree.ILogical in the logical tree.

public System.Collections.Generic.IEnumerable<Avalonia.LogicalTree.ILogical> GetLogicalChildren(Avalonia.LogicalTree.ILogical logical)

Parameters

logical Avalonia.LogicalTree.ILogical

The logical.

Returns

System.Collections.Generic.IEnumerable<Avalonia.LogicalTree.ILogical>

The logical children.

GetLogicalDescendants Method

Enumerates the descendants of an Avalonia.LogicalTree.ILogical in the logical tree.

public System.Collections.Generic.IEnumerable<Avalonia.LogicalTree.ILogical> GetLogicalDescendants(Avalonia.LogicalTree.ILogical logical)

Parameters

logical Avalonia.LogicalTree.ILogical

The logical.

Returns

System.Collections.Generic.IEnumerable<Avalonia.LogicalTree.ILogical>

The logical's ancestors.

GetLogicalParent Method

Gets the logical parent of an Avalonia.LogicalTree.ILogical.

public T GetLogicalParent<T>(Avalonia.LogicalTree.ILogical logical)

Parameters

logical Avalonia.LogicalTree.ILogical

The logical.

Returns

Avalonia.LogicalTree.ILogical

The parent, or null if the logical is unparented.

GetLogicalSiblings Method

Enumerates the siblings of an Avalonia.LogicalTree.ILogical in the logical tree.

public System.Collections.Generic.IEnumerable<Avalonia.LogicalTree.ILogical> GetLogicalSiblings(Avalonia.LogicalTree.ILogical logical)

Parameters

logical Avalonia.LogicalTree.ILogical

The logical.

Returns

System.Collections.Generic.IEnumerable<Avalonia.LogicalTree.ILogical>

The logical siblings.

GetSelfAndLogicalAncestors Method

Enumerates an Avalonia.LogicalTree.ILogical and its ancestors in the logical tree.

public System.Collections.Generic.IEnumerable<Avalonia.LogicalTree.ILogical> GetSelfAndLogicalAncestors(Avalonia.LogicalTree.ILogical logical)

Parameters

logical Avalonia.LogicalTree.ILogical

The logical.

Returns

System.Collections.Generic.IEnumerable<Avalonia.LogicalTree.ILogical>

The logical and its ancestors.

GetSelfAndLogicalDescendants Method

Enumerates an Avalonia.LogicalTree.ILogical and its descendants in the logical tree.

public System.Collections.Generic.IEnumerable<Avalonia.LogicalTree.ILogical> GetSelfAndLogicalDescendants(Avalonia.LogicalTree.ILogical logical)

Parameters

logical Avalonia.LogicalTree.ILogical

The logical.

Returns

System.Collections.Generic.IEnumerable<Avalonia.LogicalTree.ILogical>

The logical and its ancestors.

IsLogicalAncestorOf Method

Tests whether an Avalonia.LogicalTree.ILogical is an ancestor of another logical.

public bool IsLogicalAncestorOf(Avalonia.LogicalTree.ILogical logical, Avalonia.LogicalTree.ILogical target)

Parameters

logical Avalonia.LogicalTree.ILogical

The logical.

target Avalonia.LogicalTree.ILogical

The potential descendant.

Returns

bool

True if logical is an ancestor of target; otherwise false.