Table of Contents

Method TrySetFocusWithTimeout

Namespace
Alternet.UI
Assembly
Alternet.UI.Maui.dll

TrySetFocusWithTimeout(object?)

Attempts to set focus on the specified object within a predefined timeout period.

public static ControlView? TrySetFocusWithTimeout(object? instance)

Parameters

instance object

The object to set focus on. Can be null. If null, no action is taken.

Returns

ControlView

Remarks

This method retrieves the associated view of the specified object and attempts to set focus on it. If the object does not have an associated view or the view is not of type ControlView, the method does nothing.