Method BindShown
BindShown(Window, Action)
Binds an initializer action to execute after the specified form is first shown and its message loop has started.
public static void BindShown(Window form, Action action)
Parameters
formWindowThe form to which the initializer action will be bound. Cannot be null.
actionActionThe action to execute after the form is displayed. Cannot be null.
Remarks
This method ensures that the provided action runs only once, immediately after the form's initial display and after its message loop is active. This can be useful for initialization tasks that require the form to be fully loaded and visible. The action is invoked via a timer to guarantee that the form's handle and layout are ready.