Class VisualExtensions
- Namespace
- Artemis.UI.Shared.Extensions
- Assembly
- Artemis.UI.Shared.dll
Provides extension methods for Avalonia's Avalonia.Visual type
public static class VisualExtensions
- Inheritance
-
objectVisualExtensions
Methods
GetVisualChildrenOfDataContextType<T>(Visual)
Returns a recursive list of all visual children with a data context of type T.
public static List<T> GetVisualChildrenOfDataContextType<T>(this Visual root)
Parameters
rootVisualThe root visual at which to start searching.
Returns
- List<T>
A recursive list of all visual children with a data context of type
T.
Type Parameters
TThe type of data context the children should have.
GetVisualChildrenOfType<T>(Visual)
Returns a recursive list of all visual children of type T.
public static List<T> GetVisualChildrenOfType<T>(this Visual root)
Parameters
rootVisualThe root visual at which to start searching.
Returns
- List<T>
A recursive list of all visual children of type
T.
Type Parameters
TThe type the children should have.