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).
public void SetStretched( Control control, bool value )
Public Sub SetStretched( control As Control, value As Boolean )
A control from the panel’s Controls collection.
true, to stretch the control; otherwise, false.
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.