<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  HorizontalAlignment="Center" VerticalAlignment="Center">

<!-- Example 3-15. Grid in ScrollViewer -->

<ScrollViewer>
  <Grid>
    <Grid.Resources>
      <Style TargetType="TextBlock">
        <Setter Property="Margin" Value="5,3" />
      </Style>
    </Grid.Resources>

    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="*" />
      <ColumnDefinition Width="Auto" />
      <ColumnDefinition Width="Auto" />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>

    <Border Grid.Column="0" Grid.Row="0"
            Background="LightGray" BorderBrush="Gray"
            BorderThickness="1">
      <TextBlock>Title</TextBlock>
    </Border>
    <Border Grid.Column="1" Grid.Row="0"
            Background="LightGray" BorderBrush="Gray"
            BorderThickness="1">
        <TextBlock>Location</TextBlock>
    </Border>
    <Border Grid.Column="2" Grid.Row="0" Background="LightGray"
            BorderBrush="Gray" BorderThickness="1">
      <TextBlock>Rank</TextBlock>
    </Border>

    <TextBlock Grid.Column="0" Grid.Row="1" Text="Programming WPF" />
    <TextBlock Grid.Column="1" Grid.Row="1" Text="O'Reilly Media, Inc." />
    <TextBlock Grid.Column="2" Grid.Row="1" Text="1" />

    <TextBlock Grid.Column="0" Grid.Row="2" Text="IanG on Tap" />
    <TextBlock Grid.Column="1" Grid.Row="2" Text="The Internet" />
    <TextBlock Grid.Column="2" Grid.Row="2" Text="2" />
  </Grid>
</ScrollViewer>

<!-- End of Example 3-15. -->

</Page>