Simple StackPanel : StackPanel « Windows Presentation Foundation « C# / C Sharp






Simple StackPanel

Simple StackPanel
    

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Fun with Panels!" Height="313" Width="532">
  <StackPanel Background="LightSteelBlue" Orientation ="Horizontal">
    <Label Name="lblInstruction" FontSize="15">Enter Car Information</Label>
    <Label Name="lblMake">Make</Label>
    <TextBox Name="txtMake"/>
    <Label Name="lblColor">Color</Label>
    <TextBox Name="txtColor"/>
    <Label Name="lblPetName">Pet Name</Label>
    <TextBox Name="txtPetName"/>
    <Button Name="btnOK">OK</Button>
  </StackPanel>
</Window>

   
    
    
    
  








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.Set height, Background and Orientation for StackPanelSet height, Background and Orientation for 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.