Class StackLayoutPanel
A layout panel that arranges child elements in a single row or column with comprehensive sizing and wrapping capabilities.
Inherited Members
Namespace: Telerik.WinControls.Layouts
Assembly: Telerik.WinControls.dll
Syntax
public class StackLayoutPanel : LayoutPanel, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode
Remarks
StackLayoutPanel provides sophisticated linear layout functionality, allowing elements to be arranged either horizontally or vertically. It supports advanced features including element wrapping when space is exceeded, equal sizing modes, forced element dimensions, and specialized strip mode behavior.
Key capabilities include:
- Horizontal and vertical orientation support with automatic layout direction
- Element wrapping to new rows or columns when available space is exceeded
- Equal sizing modes for creating uniform element dimensions
- Right-to-left layout support with automatic content alignment adjustment
- Strip mode for single-line layouts without wrapping behavior
- Collapse elements on resize for responsive layout behavior
This layout panel is extensively used in toolbars, button panels, menu bars, ribbon controls, and other UI areas where elements need linear arrangement with intelligent space management. The panel automatically handles content alignment, element spacing, and responsive behavior across different screen sizes and orientations.
Constructors
StackLayoutPanel()
Declaration
public StackLayoutPanel()
Fields
AllElementsEqualSizeProperty
ChildrenForcedSizeProperty
CollapseElementsOnResizeProperty
EqualChildrenHeightProperty
EqualChildrenWidthProperty
FlipMaxSizeDimensionsProperty
IsInStripModeProperty
OrientationProperty
RowProperty
StackLayoutPanelLastStateKey
This constant is used internally.
Declaration
protected const long StackLayoutPanelLastStateKey = 68719476736L
Field Value
System.Int64
|
UseParentSizeAsAvailableSizeProperty
Properties
AllElementsEqualSize
Gets or sets a value indicating whether the elements have equal size.
Declaration
[RadPropertyDefaultValue("AllElementsEqualSize", typeof(StackLayoutPanel))]
[Obsolete("This property is depricated and it will be removed in R3 2023. Use EqualChildrenWidth and EqualChildrenHeight instead.")]
public bool AllElementsEqualSize { get; set; }
Property Value
System.Boolean
|
ChildrenForcedSize
ChildrenForcedSize
Declaration
[Obsolete("This property is depricated and it will be removed in R3 2023.")]
public Size ChildrenForcedSize { get; set; }
Property Value
System.Drawing.Size
|
CollapseElementsOnResize
Gets or sets a value indicating whether elements are collapsed on resize.
Declaration
[RadPropertyDefaultValue("CollapseElementsOnResize", typeof(StackLayoutPanel))]
[Obsolete("This property is depricated and it will be removed in R3 2023.")]
public bool CollapseElementsOnResize { get; set; }
Property Value
System.Boolean
|
EqualChildrenHeight
Gets or sets a value indicating whether the elements have equal height.
Declaration
[RadPropertyDefaultValue("EqualChildrenHeight", typeof(StackLayoutPanel))]
public bool EqualChildrenHeight { get; set; }
Property Value
System.Boolean
|
EqualChildrenWidth
Gets or sets a value indicating whether the elements have equal width.
Declaration
[RadPropertyDefaultValue("EqualChildrenWidth", typeof(StackLayoutPanel))]
public bool EqualChildrenWidth { get; set; }
Property Value
System.Boolean
|
FlipMaxSizeDimensions
Gets or sets a value indicating whether maximum size dimensions are flipped.
Declaration
[RadPropertyDefaultValue("FlipMaxSizeDimensions", typeof(StackLayoutPanel))]
[Obsolete("This property is depricated and it will be removed in R3 2023.")]
public bool FlipMaxSizeDimensions { get; set; }
Property Value
System.Boolean
|
InvalidateChildrenOnChildChanged
Notifies all children when same child changes. Effectively redraws all children in the panel.
Declaration
public override bool InvalidateChildrenOnChildChanged { get; }
Property Value
System.Boolean
|
Overrides
IsInStripMode
Gets or sets a value indicating whether the panel is in Strip mode or not. When in Strip mode the panel doesn't move the child elements to a new row when there's not enough space but rather arranges all elements on a single row.
Declaration
[RadPropertyDefaultValue("IsInStripMode", typeof(StackLayoutPanel))]
[Obsolete("This property is depricated and it will be removed in R3 2023.")]
public bool IsInStripMode { get; set; }
Property Value
System.Boolean
|
Orientation
Gets or sets the elements orientation inside the stacklayout. Possible values are horizontal and vertical.
Declaration
[RadPropertyDefaultValue("Orientation", typeof(StackLayoutPanel))]
public Orientation Orientation { get; set; }
Property Value
System.Windows.Forms.Orientation
|
UseParentSizeAsAvailableSize
Gets or sets a value indicating whether the panel will use its direct parent size to arrange the child elements or whether it will use the first ancestor which is a layout panel or an element with AutoSizeMode = FitToAvailableSize.
Declaration
[RadPropertyDefaultValue("UseParentSizeAsAvailableSize", typeof(StackLayoutPanel))]
[Obsolete("This property is depricated and it will be removed in R3 2023.")]
public bool UseParentSizeAsAvailableSize { get; set; }
Property Value
System.Boolean
|
Methods
ArrangeOverride(SizeF)
ArrangeOverride
Declaration
protected override SizeF ArrangeOverride(SizeF arrangeSize)
Parameters
System.Drawing.SizeF
arrangeSize
|
Returns
System.Drawing.SizeF
|
Overrides
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF constraint)
Parameters
System.Drawing.SizeF
constraint
|
Returns
System.Drawing.SizeF
|