StackPanel.SetStretched(Control, Boolean) Method

Forces the control lying on the stack panel to occupy the entire free space available in this panel. The size of a stretched control cannot exceed this control's MaximumSize. The control is strethed in the direction that matches the panel orientation (i.e., vertically for TopDown and BottomUp panels).

Namespace: DevExpress.Utils.Layout

Assembly: DevExpress.Utils.v20.1.dll

Declaration

public void SetStretched(
    Control control,
    bool value
)
Public Sub SetStretched(
    control As Control,
    value As Boolean
)

Parameters

Name Type Description
control Control

A control from the panel's Controls collection.

value Boolean

true, to stretch the control; otherwise, false.

Remarks

Call the SetStretched method when you create and customize stack panels in code. At design time, you can use the Stretched extender property that appears for every control lying on a stack panel. In the figure below, a TextEdit control lying in between two SimpleButtons is stretched.

stack-panel

stackPanel3.SetStretched(textEdit10, true);
See Also