Set height, Background and Orientation for StackPanel : StackPanel « Windows Presentation Foundation « C# / C Sharp






Set height, Background and Orientation for StackPanel

Set height, Background and Orientation for StackPanel
             

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  HorizontalAlignment="Center" VerticalAlignment="Center">

<StackPanel Height="100" Background="Yellow" Orientation="Horizontal">
  <Button>Foo</Button>
  <Button Height="30">Bar</Button>
  <Button Height="195">Quux</Button>
</StackPanel>

</Page>

   
    
    
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Stretch = Uniform
2.Stretch = UniformToFill
3.Stretch = FillStretch = Fill
4.Stretch = NoneStretch = None
5.StackPanel with StackPanelStackPanel with StackPanel
6.Simple StackPanelSimple StackPanel
7.Change StackPanel OrientationChange StackPanel Orientation
8.Use the methods that are defined by the IScrollInfo interface to scroll the child content of a StackPanel.Use the methods that are defined by the IScrollInfo interface to scroll the child content of a StackPanel.
9.Use StackPanel to arrange child objects in a single line that you can align horizontally or vertically.Use StackPanel to arrange child objects in a single line that you can align horizontally or vertically.