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

◆ resume_layout() [2/2]

void xtd::forms::control::resume_layout ( bool  perform_layout)

Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests.

Parameters
perform_layouttrue to execute pending layout requests; otherwise, false.
Remarks
Calling the resume_layout method forces an immediate layout if there are any pending layout requests. When the perform_layout parameter is set to true, an immediate layout occurs if there are any pending layout requests.
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.