Skip to main content

TemplateExtensions Class

Definition

Assembly:Avalonia.Controls
Package:Avalonia

Contains extension methods for Avalonia.Controls.Primitives.TemplatedControl.

public class TemplateExtensions

Inheritance: object -> TemplateExtensions

Methods

NameDescription
GetTemplateChildrenGets the list of all control descendants that are part of the template of a Avalonia.Controls.Primitives.TemplatedControl, i.e. their Avalonia.StyledElement.TemplatedParent is control.
GetTemplateDescendantsGets the list of all visual descendants that are part of the template of a Avalonia.Controls.Primitives.TemplatedControl, i.e. their Avalonia.StyledElement.TemplatedParent is control.

GetTemplateChildren Method

Gets the list of all control descendants that are part of the template of a Avalonia.Controls.Primitives.TemplatedControl, i.e. their Avalonia.StyledElement.TemplatedParent is control.

public System.Collections.Generic.IEnumerable<Avalonia.Controls.Control> GetTemplateChildren(Avalonia.Controls.Primitives.TemplatedControl control)

Parameters

control Avalonia.Controls.Primitives.TemplatedControl

The control whose descendants will be returned.

Returns

System.Collections.Generic.IEnumerable<Avalonia.Controls.Control>

An enumeration of Avalonia.Controls.Control objects.

GetTemplateDescendants Method

Gets the list of all visual descendants that are part of the template of a Avalonia.Controls.Primitives.TemplatedControl, i.e. their Avalonia.StyledElement.TemplatedParent is control.

public System.Collections.Generic.IEnumerable<Avalonia.Visual> GetTemplateDescendants(Avalonia.Controls.Primitives.TemplatedControl control)

Parameters

control Avalonia.Controls.Primitives.TemplatedControl

The control whose descendants will be returned.

Returns

System.Collections.Generic.IEnumerable<Avalonia.Visual>

An enumeration of Avalonia.Visual objects.