StackPanel with MinHeight, MinWidth, VerticalAlignment, HorizontalAlignment : StackPanel « Windows Presentation Foundation « VB.Net






StackPanel with MinHeight, MinWidth, VerticalAlignment, HorizontalAlignment

StackPanel with MinHeight, MinWidth, VerticalAlignment, HorizontalAlignment
      
<Window x:Class="StackPanelDemo.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="StackPanelDemo" Height="300" Width="661">
    <Grid>
    <StackPanel MinHeight="50" 
                MinWidth="50" 
                VerticalAlignment="Stretch" 
                HorizontalAlignment="Left" 
                Grid.Column="0" 
                Grid.ColumnSpan="1" 
                Grid.Row="0" 
                Grid.RowSpan="1" 
                Margin="70,10,0,93" 
                Width="211" 
                Height="NaN" 
                Name="stackPanel1" 
                FlowDirection="LeftToRight" 
                CanHorizontallyScroll="True" 
                CanVerticallyScroll="True" 
                Grid.IsSharedSizeScope="False">
      <Button VerticalAlignment="Top" HorizontalAlignment="Left" Width="75" Height="23" Name="button1">Button</Button>
      <Button VerticalAlignment="Top" HorizontalAlignment="Left" Width="75" Height="23" Name="button2">Button</Button>
      <Button VerticalAlignment="Top" HorizontalAlignment="Left" Width="124" Height="23" Name="button3">Button</Button>
    </StackPanel>
  </Grid>
</Window>

   
    
    
    
    
    
  








Related examples in the same category

1.StackPanel with Button, Ellipse and ListBoxStackPanel with Button, Ellipse and ListBox
2.Set DataContext for StackPanelSet DataContext for StackPanel
3.Arrange UI Elements in a Horizontal or Vertical StackArrange UI Elements in a Horizontal or Vertical Stack
4.StackPanel with Image BackGroundStackPanel with Image BackGround
5.Vertical StackPanelVertical StackPanel
6.Horizontal StackPanelHorizontal StackPanel
7.Put buttons to StackPanelPut buttons to StackPanel
8.Focus scope for StackPanelFocus scope for StackPanel
9.Add Button and TextBox to StackPanelAdd Button and TextBox to StackPanel
10.Align left along StackPanelAlign left along StackPanel
11.StackPanel with Label and TextBoxStackPanel with Label and TextBox
12.StackPanel search layoutStackPanel search layout
13.Using StackPanel to group elements for absolute positioningUsing StackPanel to group elements for absolute positioning
14.Search for an element by using Panel.FindName()Search for an element by using Panel.FindName()
15.Change StackPanel OrientationChange StackPanel Orientation
16.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.
17.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.