Gets or sets the dimension by which child elements are stacked.
Syntax
public: property Orientation Orientation { Orientation get(); void set (Orientation value); }
<StackPanel Orientation="Horizontal"/> -or- <StackPanel Orientation="Vertical"/>
Property value
Type: Orientation
One of the enumeration values that specifies the orientation of child elements. The default is Vertical.
Examples
The following example creates a horizontal list of items by setting the Orientation property to Horizontal.
<StackPanel Orientation="Horizontal" Margin="20"> <Rectangle Fill="Red" Width="50" Height="50" Margin="5" /> <Rectangle Fill="Blue" Width="50" Height="50" Margin="5" /> <Rectangle Fill="Green" Width="50" Height="50" Margin="5" /> <Rectangle Fill="Purple" Width="50" Height="50" Margin="5" /> </StackPanel>
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 3/12/2013