Skip to main content

FlowLayoutControl.StretchContent Property

Gets or sets whether items are stretched to fit the control’s width/height. This is a dependency property.

Namespace: DevExpress.Xpf.LayoutControl

Assembly: DevExpress.Xpf.LayoutControl.v23.2.dll

NuGet Package: DevExpress.Wpf.LayoutControl

Declaration

public bool StretchContent { get; set; }

Property Value

Type Description
Boolean

true if items are stretched to fit the control’s width/height; otherwise, false.

Remarks

For items to be stretched horizontally, ensure that their Width properties are not set. Similarly, to allow the items to be stretched vertically, ensure that their Height properties are not set.

Items are stretched according to the layout orientation (see FlowLayoutControl.Orientation). If the orientation is vertical, items are stretched to fit the control’s width. If the orientation is horizontal, items are stretched to fit the control’s height. Below, two FlowLayoutControls are shown, where items are arranged vertically and horizontally. The items are stretched to fit the control’s width and height, respectively:

FlowLayoutControl_Stretch

When item stretching is enabled, the FlowLayoutControl.BreakFlowToFit and FlowLayoutControl.IsFlowBreak options are ignored. In this mode, the control’s items are always arranged in a single column or row.

See Also