GetContent(ContentControl) Method

Definition

Assembly HeadlessTestingFramework.dll

Gets the content of a ContentControl in the logical tree.

public static T? GetContent<T>(this ContentControl contentControl)
    where T : class

Type parameters

T
The expected type of the content.

Parameters

contentControl
Avalonia.Controls.ContentControl

The content control.

Returns

{T}
The content cast to the specified type, or null if not matching.