Mega Code Archive

 
Categories / VB.Net Tutorial / WPF
 

Differences of StackPanel and DockPanel

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       WindowTitle="StackPanel vs. DockPanel">   <Grid Width="175" Height="150">     <Grid.ColumnDefinitions>       <ColumnDefinition />     </Grid.ColumnDefinitions>     <Grid.RowDefinitions>       <RowDefinition />     </Grid.RowDefinitions>          <DockPanel Grid.Column="0" Grid.Row="0">       <Image Source="c:\image.png" />       <Image Source="c:\image.png" Stretch="Fill"/>     </DockPanel>     <StackPanel Grid.Column="0" Grid.Row="1"  Orientation="Horizontal">       <Image Source="c:\image.png" />       <Image Source="c:\image.png" Stretch="Fill"/>     </StackPanel>     </Grid> </Page>