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