New to Telerik UI for WinForms? Download free 30-day trial

Layout Activation

There are two levels of layout activation: 

  1. Global: all elements in the control are affected.

    1. For theme and language changes, layout changes propagate from children to parent.

    2. Control resizing by the user or by outer layout causes layout changes that propagation from parent to children.

  2. Local: the layout starts from a particular element in the hierarchy.

    1. Adding, removing and reordering children in one element triggers local layout activation.

    2. Setting properties that affect layout or perform layout explicitly for an element. For example, the RadElement.ElementTree PerformLayout method causes the element and its children to be measured and arranged.

    3. SuspendLayout prevents layout for a RadElement while adding, removing, reordering children or when setting specific properties. ResumeLayout re-starts the deferred layout.

The layout system is called automatically due to a change in properties affecting the layout (properties with AffectsLayout, AffectsMeasure, AffectsArrange metadata flags set, e.g. Size, or Location). Layouts can still be called explicitly by the user using the UpdateLayout method on any RadElement,

Calling UpdateLayout directly is not recommended, and a sign that a better design approach is called for. The UpdateLayout method may be called directly in certain testing situations.

See Also

In this article