<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
	xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
	x:Class="WpfApplication1.MainWindow"
	x:Name="Window"
	Title="MainWindow"
	Width="640" Height="480">
<Window.Resources>
	<Style x:Key="s1" TargetType="{x:Type telerik:GridViewCell}"> 
           <Setter Property="HorizontalContentAlignment" Value="Center"/>  
       </Style>
        <!--<Style for GridViewCheckBox>-->
            <Style TargetType="{x:Type telerik:GridViewCheckBox}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type telerik:GridViewCheckBox}">
					<Grid HorizontalAlignment="Left" Height="50" VerticalAlignment="Center" Width="50">
						<Border BorderBrush="#FF989898" BorderThickness="1">
							<Border BorderBrush="#FFEEEEEE" BorderThickness="1">
								<Border BorderBrush="#FFB9B9B9" BorderThickness="1" Background="#FFE0E0E0">
									<Grid Margin="0">
										<Path x:Name="IndeterminatePath" Data="M14.708333,144.5L20.667,144.5" HorizontalAlignment="Stretch" Height="20" Margin="0" Stretch="Fill" Stroke="#FF8D8D8D" StrokeThickness="1.5" Visibility="Collapsed" VerticalAlignment="Stretch" Width="20"/>
										<Path x:Name="CheckedPath" Data="M32.376187,77.162509L35.056467,80.095277 40.075451,70.02144" HorizontalAlignment="Center" Margin="0" Stretch="Fill" Stroke="#FF8D8D8D" StrokeThickness="4" Visibility="Visible" VerticalAlignment="Center" Width="20" Height="20"/>
									</Grid>
								</Border>
							</Border>
						</Border>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="IsChecked" Value="True">
							<Setter Property="Visibility" TargetName="CheckedPath" Value="Visible"/>
						</Trigger>
						<Trigger Property="IsThreeState" Value="True">
							<Setter Property="Visibility" TargetName="IndeterminatePath" Value="Visible"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<SolidColorBrush x:Key="CheckBoxFillNormal" Color="#F4F4F4"/>
	<SolidColorBrush x:Key="CheckBoxStroke" Color="#8E8F8F"/>
	<Style x:Key="EmptyCheckBoxFocusVisual">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate>
					<Rectangle Margin="1" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="CheckRadioFocusVisual">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate>
					<Rectangle Margin="14,0,0,0" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
        <!--<Style for native CheckBox>-->
        <Style x:Key="CheckBoxStyle1" TargetType="{x:Type CheckBox}">
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="Background" Value="{StaticResource CheckBoxFillNormal}"/>
		<Setter Property="BorderBrush" Value="{StaticResource CheckBoxStroke}"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="FocusVisualStyle" Value="{StaticResource EmptyCheckBoxFocusVisual}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type CheckBox}">
					<BulletDecorator Background="Transparent" SnapsToDevicePixels="true">
						<BulletDecorator.Bullet>
							<Microsoft_Windows_Themes:BulletChrome Width="50" Height="50" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" IsChecked="{TemplateBinding IsChecked}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}"/>
						</BulletDecorator.Bullet>
					</BulletDecorator>
					<ControlTemplate.Triggers>
						<Trigger Property="HasContent" Value="true">
							<Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}"/>
							<Setter Property="Padding" Value="4,0,0,0"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style> 

	
	</Window.Resources>
	<Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource SampleDataSource}}">
		<telerik:RadGridView x:Name="gridView" Margin="41,40,32,79" AutoGenerateColumns="False" ItemsSource="{Binding Collection}">
			<telerik:RadGridView.Columns>
				<telerik:GridViewCheckBoxColumn AutoSelectOnEdit="True" EditorStyle="{StaticResource CheckBoxStyle1}" EditTriggers="CellClick" CellStyle="{StaticResource s1}" Header="IsTrue/GridViewCheckBoxColumn" DataMemberBinding="{Binding Property2}"/>
			</telerik:RadGridView.Columns>
		</telerik:RadGridView>
        <telerik:RadButton Height="22" VerticalAlignment="Bottom" Margin="28,0,10,10" Click="RadButton_Click" Content="Create Dynamic GridViewCheckBoxColumn"/>

    </Grid>
</Window>