Table of Contents

Method GetHostObject

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

GetHostObject<T>()

Retrieves the first host object of the specified type from the available host object.

public virtual T? GetHostObject<T>() where T : class

Returns

T

The first host object of type T if found; otherwise, null.

Type Parameters

T

The type of the host object to retrieve.

Remarks

This method iterates through the collection of host objects associated with this instance of HostedFrameworkElement and returns the first host that matches the specified type T. If no matching host object is found, the method returns null.