VisualExtensions Class
Provides extension methods for working with the visual tree.
Definition
Namespace: Avalonia.VisualTree
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static class VisualExtensions
<ExtensionAttribute>
Public NotInheritable Class VisualExtensions
[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type VisualExtensions = class end
Inheritance | Object → VisualExtensions |
Methods
CalculateDistanceFromAncestor(Visual, Visual) | Calculates the distance from a visual's ancestor. |
CalculateDistanceFromRoot(Visual) | Calculates the distance from a visual's root. |
FindAncestorOfType(T)(Visual, Boolean) | Finds first ancestor of given type. |
FindCommonVisualAncestor(Visual, Visual) | Tries to get the first common ancestor of two visuals. |
FindDescendantOfType(T)(Visual, Boolean) | Finds first descendant of given type. |
GetSelfAndVisualAncestors(Visual) | Enumerates an Visual and its ancestors in the visual tree. |
GetSelfAndVisualDescendants(Visual) | Enumerates an Visual and its descendants in the visual tree. |
GetTransformedBounds(Visual) | |
GetVisualAncestors(Visual) | Enumerates the ancestors of an Visual in the visual tree. |
GetVisualAt(Visual, Point) | Gets the first visual in the visual tree whose bounds contain a point. |
GetVisualAt(Visual, Point, Func(Visual, Boolean)) | Gets the first visual in the visual tree whose bounds contain a point. |
GetVisualChildren(Visual) | Enumerates the children of an Visual in the visual tree. |
GetVisualDescendants(Visual) | Enumerates the descendants of an Visual in the visual tree. |
GetVisualParent(Visual) | Gets the visual parent of an Visual. |
GetVisualParent(T)(Visual) | Gets the visual parent of an Visual. |
GetVisualRoot(Visual) | Gets the root visual for an Visual. |
GetVisualsAt(Visual, Point) | Enumerates the visible visuals in the visual tree whose bounds contain a point. |
GetVisualsAt(Visual, Point, Func(Visual, Boolean)) | Enumerates the visuals in the visual tree whose bounds contain a point. |
IsAttachedToVisualTree(Visual) | Returns a value indicating whether this control is attached to a visual root. |
IsVisualAncestorOf(Visual, Visual) | Tests whether an Visual is an ancestor of another visual. |
SortByZIndex(IEnumerable(Visual)) |