Using Silverlight 2 Layout Controls: Listing 1

<Grid x:Name="LayoutRoot" Background="White" Width="800" 
 ShowGridLines="false">

  <Grid.RowDefinitions>
    <RowDefinition />
    <RowDefinition />
  </Grid.RowDefinitions>

  <Grid.ColumnDefinitions>
    <ColumnDefinition Width=".25*" />
    <ColumnDefinition Width=".75*" />
  </Grid.ColumnDefinitions>
  
  <!-- First Row -->
  <TextBlock Grid.Row="0" Grid.Column="0" Text="First Name" />
  <TextBox x:Name="txtFirstName" Grid.Row="0" Grid.Column="1" />
  <!-- Second Row -->
  <TextBlock Grid.Row="1" Grid.Column="0" Text="Last Name" />
  <TextBox x:Name="txtLastName" Grid.Row="1" Grid.Column="1" />
</Grid>
comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.