xtd 0.2.0
Loading...
Searching...
No Matches

◆ suspend_layout()

void xtd::forms::control::suspend_layout ( )

Temporarily suspends the layout logic for the control.

Remarks
The layout logic of the control is suspended until the resume_layout method is called.
The suspend_layout and resume_layout methods are used in tandem to suppress multiple xtd::forms::control::layout events while you adjust multiple attributes of the control. For example, you would typically call the suspend_layout method, then set the size, location, anchor, or dock properties of the control, and then call the resume_layout method to enable the changes to take effect.
There must be no pending calls to suspend_layout for resume_layout to be successfully called.
Note
When adding several controls to a parent control, it is recommended that you call the suspend_layout method before initializing the controls to be added. After adding the controls to the parent control, call the resume_layout method. This will increase the performance of applications with many controls.