Stack Panel Layout

Stack panel layout arrange control either vertically or horizontally. At the time of stack layout creation you have to set the property Orientation either as Vertical or as Horizontal.

For Example

You can check the following code as example of stack layout:-

	<Window x:Class="WpfApplication2.MainWindow"
        Title="Tech Altum" Height="500" Width="700">

    <StackPanel Orientation="Vertical">
        <Label>What is your Favourite Colour</Label>
        <Button >Red</Button>
        <Button >Green</Button>
        <Button >Blue</Button>
        <Button >Pink</Button>


The output of this example as follows:-

stack Layout in WPF Figure 1