<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="C1DataGrid_Demo2010.ConditionalFormat" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml">
	<UserControl.Resources>
		<SolidColorBrush x:Key="WarningBrush" Color="#FFFFFF72" />
		<SolidColorBrush x:Key="DelayBrush" Color="Orange" />
		<SolidColorBrush x:Key="ProblemBrush" Color="#FFA71818" />

		<Style x:Key="BorderStyle" TargetType="Border">
			<Setter Property="BorderBrush" Value="#FF0A2035" />
			<Setter Property="BorderThickness" Value="1" />
			<Setter Property="CornerRadius" Value="1" />
			<Setter Property="Width" Value="15" />
			<Setter Property="Height" Value="15" />
			<Setter Property="Margin" Value="0 0 5 0" />
		</Style>

	</UserControl.Resources>

	<Grid x:Name="LayoutRoot">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="10" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<Border Margin="0 0 0 10">
			<StackPanel Orientation="Horizontal">
				<Border Style="{StaticResource BorderStyle}" Background="{StaticResource WarningBrush}" />
				<TextBlock Text="Warning" Margin="0,0,10,0" />

				<Border Style="{StaticResource BorderStyle}" Background="{StaticResource DelayBrush}" />
				<TextBlock Text="Small Delay" Margin="0,0,10,0" />

				<Border Style="{StaticResource BorderStyle}" Background="{StaticResource ProblemBrush}" />
				<TextBlock Text="Huge Delay" Margin="0,0,10,0" />
			</StackPanel>
		</Border>
		<c1:C1DataGrid x:Name="grid" Grid.Row="2" CanUserAddRows="False" RowHeight="30" IsReadOnly="true" AutoGenerateColumns="False">
			<c1:C1DataGrid.Columns>
				<c1:DataGridTextColumn Binding="{Binding ProductName, Mode=TwoWay}" FilterMemberPath="ProductName" SortMemberPath="ProductName" Header="Product" />
				<c1:DataGridTextColumn Binding="{Binding Price, Mode=TwoWay}" FilterMemberPath="Price" SortMemberPath="Price" Header="Price" Format="00.00 USD" />
                <c1:DataGridDateTimeColumn Binding="{Binding ReadyForDelivery, Mode=TwoWay}" FilterMemberPath="ReadyForDelivery" SortMemberPath="ReadyForDelivery" Header="Will be Ready" Format="d" />
				<c1:DataGridTextColumn Binding="{Binding DeliveryDays, Mode=TwoWay}" FilterMemberPath="DeliveryDays" SortMemberPath="DeliveryDays" Header="Delivery Days" />
                <c1:DataGridDateTimeColumn Binding="{Binding ExpectedDelivery, Mode=TwoWay}" FilterMemberPath="ExpectedDelivery" SortMemberPath="ExpectedDelivery" Header="Expected Delivery" Format="d" />
			</c1:C1DataGrid.Columns>
		</c1:C1DataGrid>
	</Grid>
</UserControl>