Table of Contents

Method DoInsideLayout

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

DoInsideLayout(Action, bool)

Executes action between calls to SuspendLayout() and ResumeLayout(bool, bool).

public virtual void DoInsideLayout(Action action, bool layoutParent = true)

Parameters

action Action

Action that will be executed.

layoutParent bool

Specifies whether to call parent's PerformLayout(bool). Optional. By default is true.

DoInsideLayout<T>(T, Action<T>, bool)

Executes the specified action within a layout suspension context, ensuring that layout updates are resumed afterward.

public virtual void DoInsideLayout<T>(T prm, Action<T> action, bool layoutParent = true)

Parameters

prm T

The parameter of type T to pass to the action.

action Action<T>

The action to execute. This action is provided with a parameter of type T.

layoutParent bool

A value indicating whether the parent layout should also be resumed. The default value is true.

Type Parameters

T

The type of the parameter to be passed to the action.

Remarks

This method suspends layout updates before executing the specified action and ensures that layout updates are resumed afterward, even if the action throws an exception. Use this method to perform operations that temporarily modify the layout without triggering intermediate layout updates.