Summary
Gets the visual parent of an
IVisual
.
- Namespace
- Avalonia
.VisualTree - Containing Type
- VisualExtensions
Syntax
public static T GetVisualParent<T>(this IVisual visual) where T : class
Type Parameters
Name | Description |
---|---|
T | The type of the visual parent. |
Parameters
Name | Type | Description |
---|---|---|
visual | IVisual | The visual. |
Return Value
Type | Description |
---|---|
T | The parent, or null if the visual is unparented or its parent is not of type T. |