<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="C1DataGrid_Demo2010.TemplateRows" d:DataContext="{d:DesignData Source=/DesignData/SampleProducts.xaml}" mc:Ignorable="d" 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" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:local="clr-namespace:C1DataGrid_Demo2010">
    <UserControl.Resources>
        <DataTemplate x:Key="TemplateRow">
            <Grid Height="100">
                <Grid.Resources>
                    <local:ImageSourceConverter x:Key="ImageConverter" />
                    <c1:ColorConverter x:Key="ColorConverter" />
                </Grid.Resources>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="106" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Rectangle Fill="White" Margin="12,27,14,23" />
                <Image Margin="12,27,14,23" Source="{Binding ImageUrl, Converter={StaticResource ImageConverter}}" Height="50" Width="80" />
                <Image Margin="8,23,10,19" Height="58" Width="88" Source="/C1DataGrid_Demo2010.5;component/Resources/ImageBorder.png" />
                <Grid Grid.Column="1">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="110" MaxWidth="110" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="110" MaxWidth="110" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="Product Number :" TextWrapping="Wrap" VerticalAlignment="Center" />
                    <TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Grid.Row="1"><Run Text="Name " /><Run Text=":" /></TextBlock>
                    <TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Grid.Row="2"><Run Text="Standard Cost" /><Run Text=":" /></TextBlock>
                    <TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Grid.Row="3"><Run Text="Available" /><Run Text=":" /></TextBlock>
                    <!--<Line Grid.ColumnSpan="2" Height="1" VerticalAlignment="Bottom"  Margin="0,0,8,0" X2="1" Stroke="#56B1C3D4" Stretch="Fill"/>
                    <Line Grid.ColumnSpan="2" Grid.Row="1" Height="1" VerticalAlignment="Bottom"  Margin="0,0,8,0" X2="1" Stroke="#56B1C3D4" Stretch="Fill"/>
                    <Line Grid.ColumnSpan="2" Grid.Row="2" Height="1" VerticalAlignment="Bottom"  Margin="0,0,8,0" X2="1" Stroke="#56B1C3D4" Stretch="Fill"/>-->
                    <TextBlock TextWrapping="Wrap" Text="{Binding ProductNumber}" VerticalAlignment="Center" Grid.Column="1" HorizontalAlignment="Left" />
                    <TextBlock TextWrapping="Wrap" Text="{Binding Name, Mode=OneWay}" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" />
                    <TextBlock TextWrapping="Wrap" Text="{Binding StandardCost, Mode=OneWay}" Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" />
                    <TextBlock TextWrapping="Wrap" Text="{Binding Available, Mode=OneWay}" VerticalAlignment="Center" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Left" />
                    <TextBlock Text="Expiration Date:" TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="2" />
                    <TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="2" Grid.Row="1"><Run Text="Color" /><Run Text=":" /></TextBlock>
                    <TextBlock TextWrapping="Wrap" VerticalAlignment="Center" Grid.Column="2" Grid.Row="2"><Run Text="Description" /><Run Text=":" /></TextBlock>
                    <TextBlock TextWrapping="Wrap" Text="{Binding ExpirationDate, Mode=OneWay}" VerticalAlignment="Center" Grid.Column="3" HorizontalAlignment="Left" />
                    <c1:C1CheckeredBorder HorizontalAlignment="Left" Margin="0,4" Background="{Binding Color, Converter={StaticResource ColorConverter}, Mode=OneWay}" Grid.Column="3" Grid.Row="1" Width="44" />
                    <TextBlock TextWrapping="Wrap" Text="{Binding Description, Mode=OneWay}" VerticalAlignment="Center" Grid.Column="3" Grid.Row="2" HorizontalAlignment="Left" />
                    <!--<Line Grid.ColumnSpan="2" Grid.Column="2" Height="1" VerticalAlignment="Bottom"  Margin="0,0,8,0" X2="1" Stroke="#56B1C3D4" Stretch="Fill"/>
                    <Line Grid.ColumnSpan="2" Grid.Row="1" Grid.Column="2" Height="1" VerticalAlignment="Bottom"  Margin="0,0,8,0" X2="1" Stroke="#56B1C3D4" Stretch="Fill"/>
                    <Line Grid.ColumnSpan="2" Grid.Row="2" Grid.Column="2" Height="1" VerticalAlignment="Bottom"  Margin="0,0,8,0" X2="1" Stroke="#56B1C3D4" Stretch="Fill"/>-->
                    <!--<Path Stretch="Fill" Stroke="#56B1C3D4" Height="1" VerticalAlignment="Bottom" UseLayoutRounding="False" Grid.ColumnSpan="2" Data="M100,28 L811,28" Margin="0,0,8,0" Grid.Column="2"/>
            		<Path Stretch="Fill" Stroke="#56B1C3D4" Height="1" Margin="0,0,8,0" VerticalAlignment="Top" UseLayoutRounding="False" Data="M100,28 L811,28" Grid.ColumnSpan="2" Grid.Row="2" Grid.Column="2"/>
            		<Path Stretch="Fill" Stroke="#56B1C3D4" Height="1" Margin="0,0,8,0" VerticalAlignment="Bottom" UseLayoutRounding="False" Data="M100,28 L811,28" Grid.ColumnSpan="2" Grid.Row="2" Grid.Column="2"/>-->
                </Grid>
            </Grid>
        </DataTemplate>
        <local:ImageSourceConverter x:Key="ImageConverter" />
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">

        <c1:C1DataGrid x:Name="grid" Background="Transparent" ItemsSource="{Binding}" AutoGeneratingColumn="grid_AutoGeneratingColumn" CreatingRow="C1DataGrid_CreatingRow" BeginningNewRow="grid_BeginningNewRow" RowHeight="100" GridLinesVisibility="All" CanUserGroup="True" />
    </Grid>
</UserControl>