Summary
Provides extension methods for working with the visual tree.
- Namespace
- Avalonia
.VisualTree - Base Types
-
- object
graph BT
Type-->Base0["object"]
Type["VisualExtensions"]
class Type type-node
Syntax
public static class VisualExtensions
Methods
Name | Value | Summary |
---|---|---|
Calculate |
int |
Calculates the distance from a visual's ancestor.
static
|
Calculate |
int |
Calculates the distance from a visual's root.
static
|
FindAncestorOfType |
T |
Finds first ancestor of given type.
static
|
Find |
IVisual |
Tries to get the first common ancestor of two visuals.
static
|
FindDescendantOfType |
T |
Finds first descendant of given type.
static
|
Get |
IEnumerable |
Enumerates an
IVisual and its ancestors in the visual tree.
static
|
Get |
IEnumerable |
Enumerates an
IVisual and its descendants in the visual tree.
static
|
GetVisualAncestors |
IEnumerable |
Enumerates the ancestors of an
IVisual in the visual tree.
static
|
GetVisualAt |
IVisual |
Gets the first visual in the visual tree whose bounds contain a point.
static
|
GetVisualAt |
IVisual |
Gets the first visual in the visual tree whose bounds contain a point.
static
|
GetVisualChildren |
IEnumerable |
Enumerates the children of an
IVisual in the visual tree.
static
|
GetVisualDescendants |
IEnumerable |
Enumerates the descendants of an
IVisual in the visual tree.
static
|
GetVisualParent |
IVisual |
Gets the visual parent of an
IVisual .
static
|
GetVisualParent |
T |
Gets the visual parent of an
IVisual .
static
|
GetVisualRoot |
IRenderRoot |
Gets the root visual for an
IVisual .
static
|
GetVisualsAt |
IEnumerable |
Enumerates the visible visuals in the visual tree whose bounds contain a point.
static
|
GetVisualsAt |
IEnumerable |
Enumerates the visuals in the visual tree whose bounds contain a point.
static
|
IsVisualAncestorOf |
bool |
Tests whether an
IVisual is an ancestor of another visual.
static
|
SortByZIndex |
IEnumerable |
static
|