StackPanel.Orientation=Vertical : StackPanel « Containers « Silverlight






StackPanel.Orientation=Vertical

    


<UserControl x:Class='SilverlightApplication3.MainPage'
    xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' 
    xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
    xmlns:d='http://schemas.microsoft.com/expression/blend/2008' 
    xmlns:mc='http://schemas.openxmlformats.org/markup-compatibility/2006' 
    mc:Ignorable='d' 
    d:DesignWidth='640' 
    d:DesignHeight='480'>
  <Grid>
    <StackPanel Grid.Column="2" Grid.Row="0" HorizontalAlignment="Left" Name="StackPanel3" 
                VerticalAlignment="Top">
        <TextBlock FontSize="18" HorizontalAlignment="Center" Margin="0,0,0,15">StackPanel3</TextBlock>

        <Button Margin="10">Button 7</Button>
        <Button Margin="10">Button 8</Button>
        <Button Margin="10">Button 9</Button>

        <TextBlock>ColumnDefinition.Width="Auto"</TextBlock>
        <TextBlock>StackPanel.HorizontalAlignment="Left"</TextBlock>
        <TextBlock>StackPanel.VerticalAlignment="Top"</TextBlock>
        <TextBlock>StackPanel.Orientation="Vertical"</TextBlock>
        <TextBlock>Button.Margin="10"</TextBlock>      
    </StackPanel>
  </Grid>
</UserControl>

   
    
    
    
  








Related examples in the same category

1.Positioning UI Elements with a StackPanelPositioning UI Elements with a StackPanel
2.Using a StackPanel controlUsing a StackPanel control
3.Horizontal StackPanel exampleHorizontal StackPanel example
4.A basic StackPanel with three elementsA basic StackPanel with three elements
5.A basic StackPanel that uses a Horizontal OrientationA basic StackPanel that uses a Horizontal Orientation
6.A StackPanel with three VisibleUIElement itemsA StackPanel with three VisibleUIElement items
7.A StackPanel with a CollapsedUIElementA StackPanel with a CollapsedUIElement
8.Simple StackPanel
9.Set height, Background and Orientation for StackPanel
10.Change StackPanel Orientation
11.Use StackPanel to arrange child objects in a single line that you can align horizontally or vertically.
12.Layout with StackPanelLayout with StackPanel
13.Put controls into StackPanelPut controls into StackPanel
14.Nested StackPanelsNested StackPanels