Class
Element

Base class for nodes that may have children.

Definition

Namespace:Telerik.Core

Assembly:Telerik.WinUI.Controls.dll

Syntax:

cs-api-definition
public abstract class Element : Node, INotifyPropertyChanged

Inheritance: objectPropertyBagObjectNodeElement

Derived Classes: RootElement

Implements: INotifyPropertyChanged

Inherited Members Node.Arrange(RadRect, bool)Node.Invalidate()Node.IsArrangeValidNode.NodeStateNode.IndexNode.CollectionIndexNode.IsTreeLoadedNode.LayoutSlotNode.ParentNode.PropertyChanged

Constructors

Element()

Initializes a new instance of the Element class.

Declaration

cs-api-definition
protected Element()

Properties

Presenter

Gets the IElementPresenter instance where this element is presented.

Declaration

cs-api-definition
public override IElementPresenter Presenter { get; }

Property Value

IElementPresenter

Overrides Node.Presenter

Methods

EnumDescendants()

Provides flexible routine for traversing all descendants of this instance.

Declaration

cs-api-definition
public IEnumerable<Node> EnumDescendants()

Returns

IEnumerable<Node>

EnumDescendants(Predicate<Node>, TreeTraversalMode)

Provides flexible routine for traversing all descendants of this instance that match the provided predicate.

Declaration

cs-api-definition
public IEnumerable<Node> EnumDescendants(Predicate<Node> predicate, TreeTraversalMode traverseMode)

Parameters

predicate

Predicate<Node>

The predicate that defines the match criteria.

traverseMode

TreeTraversalMode

The mode used to traverse the subtree.

Returns

IEnumerable<Node>

EnumDescendants(TreeTraversalMode)

Provides flexible routine for traversing all descendants of this instance.

Declaration

cs-api-definition
public IEnumerable<Node> EnumDescendants(TreeTraversalMode traverseMode)

Parameters

traverseMode

TreeTraversalMode

The mode used to traverse the subtree.

Returns

IEnumerable<Node>

FindAncestor<T>()

Searches up the parent chain and returns the first parent of type T.

Declaration

cs-api-definition
public T FindAncestor<T>() where T : Element

Returns

T

FindDescendant(Predicate<Node>)

Searches down the subtree of elements, using breadth-first approach, and returns the first descendant of type T.

Declaration

cs-api-definition
public Node FindDescendant(Predicate<Node> criteria)

Parameters

criteria

Predicate<Node>

Returns

Node

FindDescendant<T>()

Searches down the subtree of elements, using breadth-first approach, and returns the first descendant of type T.

Declaration

cs-api-definition
public T FindDescendant<T>() where T : Node

Returns

T

IsAncestorOf(Node)

Gets a boolean value that determines whether a given element resides in the element hierarchy of this element.

Declaration

cs-api-definition
public bool IsAncestorOf(Node node)

Parameters

node

Node

An instance of the Node class which is checked.

Returns

bool