VisualExtensions Class
Provides extension methods for the Avalonia.Visual type.
public static class VisualExtensions
- Inheritance:
- object object
Methods
GetFirstFocusableVisualDescendant(Visual?)
Gets the first focusable visual descendant.
public static InputElement? GetFirstFocusableVisualDescendant(this Visual? visual)
Parameter | Type | Description |
---|---|---|
visual | Visual | The visual whose descendants will be searched. |
Returns
- InputElement:
The first focusable visual, or
null
if a match could not be found.
InvalidateMeasureForAllVisualsInSameTemplate(Visual?)
Invalidates measurement of all elements within the same source templated Avalonia.Visual.
public static void InvalidateMeasureForAllVisualsInSameTemplate(this Visual? sourceTemplatedElement)
Parameter | Type | Description |
---|---|---|
sourceTemplatedElement | Visual | The source templated Avalonia.Visual. |
InvalidateMeasureForVisualAncestorPath<PathEndType>(Visual?, bool)
Invalidates measurement from the source visual up to an ancestor of type PathEndType
.
public static void InvalidateMeasureForVisualAncestorPath<PathEndType>(this Visual? source, bool includePathEnd = true)
- Type Parameters:
-
PathEndType
-The ancestor type at which to stop.
Parameter | Type | Description |
---|---|---|
source | Visual | The visual at which to start invalidation. |
includePathEnd | bool | Whether to also invalidate the |