<UserControl x:Class="DataGridSamples.Validation"
    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"
    d:DataContext="{d:DesignData Source=/DesignData/SampleProducts.xaml}"
    mc:Ignorable="d" >
    <UserControl.Resources>
       
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Border Margin="0 0 0 10">
            <CheckBox Content="Show Validation Indicators" IsChecked="{Binding ShowValidationIndicators, ElementName=grid, Mode=TwoWay}" VerticalAlignment="Center"/>
        </Border>
        <c1:C1DataGrid x:Name="grid" 
                       ItemsSource="{Binding}"
                       AutoGeneratingColumn="grid_AutoGeneratingColumn" 
                       RowHeight="25" 
                       Grid.Row="1">
            <c1:C1ValidationBehavior.ValidationBehavior>
                <c1:C1ValidationBehavior/>
            </c1:C1ValidationBehavior.ValidationBehavior>
        </c1:C1DataGrid>
    </Grid>
</UserControl>
