Method GetHostObject
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
Tif found; otherwise, null.
Type Parameters
TThe 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.