Mega Code Archive

 
Categories / Silverlight / Containers
 

Grid in ScrollViewer

<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'> <ScrollViewer>   <Grid>     <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>Key</TextBlock>     </Border>     <Border Grid.Column="1" Grid.Row="0" Background="LightGray" BorderBrush="Gray" BorderThickness="1">         <TextBlock>Value</TextBlock>     </Border>     <Border Grid.Column="2" Grid.Row="0" Background="LightGray" BorderBrush="Gray" BorderThickness="1">       <TextBlock>Value 2</TextBlock>     </Border>     <TextBlock Grid.Column="0" Grid.Row="1" Text="WPF" />     <TextBlock Grid.Column="1" Grid.Row="1" Text="Inc." />     <TextBlock Grid.Column="2" Grid.Row="1" Text="this" />     <TextBlock Grid.Column="0" Grid.Row="2" Text="is" />     <TextBlock Grid.Column="1" Grid.Row="2" Text="a" />     <TextBlock Grid.Column="2" Grid.Row="2" Text="test" />   </Grid> </ScrollViewer> </UserControl>