Mega Code Archive

 
Categories / Silverlight / Containers
 

Grid with Column Definition and Row definition

<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 Background="AliceBlue">         <Grid.ColumnDefinitions>             <ColumnDefinition MinWidth="100" MaxWidth="200" />             <ColumnDefinition MaxWidth="100" />             <ColumnDefinition Width="50" />             <ColumnDefinition Width="*" />         </Grid.ColumnDefinitions>         <Grid.RowDefinitions>             <RowDefinition Height="50" />             <RowDefinition MinHeight="100" />             <RowDefinition />         </Grid.RowDefinitions>         <Ellipse Grid.Row="0" Grid.Column="0" Fill="BlanchedAlmond" Stroke="Black" />         <Ellipse Grid.Row="0" Grid.Column="1" Fill="BurlyWood"  Stroke="Black" />         <Ellipse Grid.Row="2" Grid.Column="0" Fill="BlanchedAlmond" Stroke="Black" />         <Ellipse Grid.Row="2" Grid.Column="1" Fill="Red"  Stroke="Black" />         <Ellipse Grid.Row="2" Grid.Column="2" Fill="BlanchedAlmond" Stroke="Black" />         <Ellipse Grid.Row="2" Grid.Column="3" Fill="BurlyWood" Stroke="Black" />         <Ellipse Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2" Fill="Gold"  Stroke="Black" Height="50"/>     </Grid> </UserControl>