Table of Contents

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
object
VisualExtensions

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

root Visual

The 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

T

The 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

root Visual

The root visual at which to start searching.

Returns

List<T>

A recursive list of all visual children of type T.

Type Parameters

T

The type the children should have.