Mega Code Archive

 
Categories / Silverlight / Containers
 

Put more than one Object to one Grid Cell

<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 ShowGridLines ="True" Background ="AliceBlue">   <Grid.ColumnDefinitions>     <ColumnDefinition/>     <ColumnDefinition/>   </Grid.ColumnDefinitions>   <Grid.RowDefinitions>     <RowDefinition/>     <RowDefinition/>   </Grid.RowDefinitions>   <TextBlock Name="lblInstruction" Grid.Column ="0" Grid.Row ="0" FontSize="15">Enter Car Information</TextBlock>   <Button Name="btnOK"  Height ="30" Grid.Column ="0" Grid.Row ="0" >OK</Button>   <TextBlock Name="lblMake" Grid.Column ="1" Grid.Row ="0">Make</TextBlock>   <TextBox Name="txtMake" Grid.Column ="1" Grid.Row ="0" Width="193" Height="25"/>   <TextBlock Name="lblColor" Grid.Column ="0" Grid.Row ="1" >Color</TextBlock>   <TextBox Name="txtColor" Width="193" Height="25" Grid.Column ="0" Grid.Row ="1" />   <Rectangle Fill ="LightGreen" Grid.Column ="1" Grid.Row ="1" />   <TextBlock Name="lblPetName" Grid.Column ="1" Grid.Row ="1" >Pet Name</TextBlock>   <TextBox Name="txtPetName" Grid.Column ="1" Grid.Row ="1" Width="193" Height="25"/> </Grid> </UserControl>