<UserControl x:Class="DataGridSamples.DeferredScrolling"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:DataGridSamples"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <!-- 
        The DataContext of this DataTemplate is the DataGridRow object 
        so you can access all the properties you need, either from the DataItem
        or from the row itself.
        -->
            <DataTemplate x:Key="MyScrollPreviewRowTemplate">
                <Border CornerRadius="5" Background="#FFF1F1F1" 
                    BorderBrush="DarkGray" 
                    BorderThickness="2" 
                    Margin="2">
                    <Grid Width="200">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <StackPanel Orientation="Horizontal" Margin="10 0 0 0" Grid.Row="0"  Grid.Column="0" Grid.RowSpan="2" VerticalAlignment="Center" >
                            <TextBlock Text="#" FontSize="14" Foreground="DarkGray" />
                            <TextBlock Text="{Binding Index}" FontSize="14" Foreground="DarkGray" />
                        </StackPanel>
                        <TextBlock Text="{Binding DataItem.Name}" Margin="10 0 0 0" FontWeight="Bold" Grid.Row="0" Grid.Column="1" />
                        <TextBlock Text="{Binding DataItem.Born}" Margin="10 0 0 0" Grid.Row="1"  Grid.Column="1" />
                    </Grid>
                </Border>
            </DataTemplate>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <c1:C1DataGrid x:Name="dataGrid" 
                     ScrollMode="Deferred"
                     ScrollPreviewRowTemplate="{StaticResource MyScrollPreviewRowTemplate}"
                     AutoGenerateColumns="True" CanUserAddRows="False" />
    </Grid>
</UserControl>
