<UserControl x:Class="DataGridSamples.Appearance"
      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"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      d:DataContext="{d:DesignData Source=/DesignData/SampleProducts.xaml}"
      mc:Ignorable="d" d:DesignHeight="520" d:DesignWidth="850">
    <UserControl.Resources>
        <ResourceDictionary>
            <Style x:Key="colorPickerStyle" TargetType="c1:C1ColorPicker">
                <Setter Property="Mode" Value="Basic"/>
                <Setter Property="ShowTransparentColor" Value="True"/>
            </Style>

            <Style x:Key="DarkGray" TargetType="c1:C1DataGrid">
                <Setter Property="Background" Value="#FF000000"/>
                <Setter Property="BorderBrush" Value="#FF595959"/>
                <Setter Property="HorizontalGridLinesBrush" Value="#FF808080"/>
                <Setter Property="MouseOverBrush" Value="#FF31859C"/>
                <Setter Property="PressedBrush" Value="#FF215968"/>
                <Setter Property="RowBackground" Value="#FF808080"/>
                <Setter Property="AlternatingRowBackground" Value="#FF595959"/>
                <Setter Property="SelectedBackground" Value="#FF215968"/>
                <Setter Property="VerticalGridLinesBrush" Value="#FF595959"/>
                <Setter Property="Foreground" Value="#FFFFFFFF"/>
                <Setter Property="RowForeground" Value="#FF000000"/>
                <Setter Property="AlternatingRowForeground" Value="#FFFFFFFF"/>
                <Setter Property="ValidationBackground" Value="#FFFFC000"/>
                <Setter Property="ValidationForeground" Value="#FF000000"/>
                <Setter Property="HeaderBackground" Value="#FF262626"/>
                <Setter Property="HeaderForeground" Value="#FFFFFFFF"/>
                <Setter Property="GroupingPanelBackground" Value="#FF000000"/>
                <Setter Property="GroupingPanelForeground" Value="#FFFFFFFF"/>
                <Setter Property="GridLinesVisibility" Value="All"/>
            </Style>
            <Style x:Key="BlueTransparent" TargetType="c1:C1DataGrid">
                <Setter Property="Background" Value="#00FFFFFF"/>
                <Setter Property="BorderBrush" Value="#FF7798A8"/>
                <Setter Property="HorizontalGridLinesBrush" Value="#91FFFFFF"/>
                <Setter Property="MouseOverBrush" Value="#81FFFFFF"/>
                <Setter Property="PressedBrush" Value="#AFFFFFFF"/>
                <Setter Property="RowBackground" Value="#5FFFFFFF"/>
                <Setter Property="AlternatingRowBackground" Value="#6EFFFFFF"/>
                <Setter Property="SelectedBackground" Value="#C7FFFFFF"/>
                <Setter Property="VerticalGridLinesBrush" Value="#91FFFFFF"/>
                <Setter Property="Foreground" Value="#FFFFFFFF"/>
                <Setter Property="RowForeground" Value="#FF000000"/>
                <Setter Property="AlternatingRowForeground" Value="#FF000000"/>
                <Setter Property="ValidationBackground" Value="#FF84FF00"/>
                <Setter Property="ValidationForeground" Value="#FF002060"/>
                <Setter Property="HeaderBackground" Value="#C1164F6C"/>
                <Setter Property="HeaderForeground" Value="#FFFFFFFF"/>
                <Setter Property="GroupingPanelBackground" Value="#91FFFFFF"/>
                <Setter Property="GroupingPanelForeground" Value="#FF0A2D3F"/>
                <Setter Property="GridLinesVisibility" Value="All"/>
            </Style>
            <Style x:Key="Green" TargetType="c1:C1DataGrid">
                <Setter Property="Background" Value="#FF2B2E25"/>
                <Setter Property="BorderBrush" Value="#FF4B5A29"/>
                <Setter Property="HorizontalGridLinesBrush" Value="#FFA6A6A6"/>
                <Setter Property="MouseOverBrush" Value="#FF4F6228"/>
                <Setter Property="PressedBrush" Value="#AFFFFFFF"/>
                <Setter Property="RowBackground" Value="#FFFFFFFF"/>
                <Setter Property="AlternatingRowBackground" Value="#FFD9D9D9"/>
                <Setter Property="SelectedBackground" Value="#FF77933C"/>
                <Setter Property="VerticalGridLinesBrush" Value="#FF808080"/>
                <Setter Property="Foreground" Value="#FFFFFFFF"/>
                <Setter Property="RowForeground" Value="#FF000000"/>
                <Setter Property="AlternatingRowForeground" Value="#FF000000"/>
                <Setter Property="ValidationBackground" Value="#FFFFFF00"/>
                <Setter Property="ValidationForeground" Value="#FF4A452A"/>
                <Setter Property="HeaderBackground" Value="#FF576D1C"/>
                <Setter Property="HeaderForeground" Value="#FFFFFFFF"/>
                <Setter Property="GroupingPanelBackground" Value="#FF2B2E25"/>
                <Setter Property="GroupingPanelForeground" Value="#FFFFFFFF"/>
                <Setter Property="GridLinesVisibility" Value="None"/>
            </Style>
            <Style x:Key="Orange" TargetType="c1:C1DataGrid">
                <Setter Property="Background" Value="#FF404040"/>
                <Setter Property="BorderBrush" Value="#FFB7580B"/>
                <Setter Property="HorizontalGridLinesBrush" Value="#FF404040"/>
                <Setter Property="MouseOverBrush" Value="#FFF8A528"/>
                <Setter Property="PressedBrush" Value="#AFFFFFFF"/>
                <Setter Property="RowBackground" Value="#FF4C4B4B"/>
                <Setter Property="AlternatingRowBackground" Value="#FF595959"/>
                <Setter Property="SelectedBackground" Value="#FFD86E00"/>
                <Setter Property="VerticalGridLinesBrush" Value="#FF404040"/>
                <Setter Property="Foreground" Value="#FF262626"/>
                <Setter Property="RowForeground" Value="#FFFFFFFF"/>
                <Setter Property="AlternatingRowForeground" Value="#FFFFFFFF"/>
                <Setter Property="ValidationBackground" Value="#FF9300FF"/>
                <Setter Property="ValidationForeground" Value="#FFFFFFFF"/>
                <Setter Property="HeaderBackground" Value="#FFE46C0A"/>
                <Setter Property="HeaderForeground" Value="#FF262626"/>
                <Setter Property="GroupingPanelBackground" Value="#FF404040"/>
                <Setter Property="GroupingPanelForeground" Value="#FFD9D9D9"/>
                <Setter Property="GridLinesVisibility" Value="All"/>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>
    <!-- Control instance -->
    <Border>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>
        	<StackPanel Margin="10,0,0,10" Orientation="Horizontal" VerticalAlignment="Center">
        		<TextBlock Text="Select a predefined style:" VerticalAlignment="Center" TextWrapping="Wrap"/>
        		<ComboBox x:Name="cmbStyles" Margin="6,0,0,0" SelectionChanged="cmbStyles_SelectionChanged" HorizontalAlignment="Left" Width="100" Height="22"/>
        		<TextBlock Text="Export the current style:" Margin="28,0,7,0" VerticalAlignment="Center" TextWrapping="Wrap"/>
        		<Button x:Name="btnExportStyle" Click="btnExportStyle_Click" Content="Export" Width="100" Height="22" Padding="0" />
        	</StackPanel>
            <Border Grid.Row="1">
                <Grid>
                    <Image Source="/DataGridSamples.4;component/Resources/dos.jpg" Stretch="Fill"/>
                    <c1:C1DataGrid x:Name="grid" 
                                       AutoGeneratingColumn="grid_AutoGeneratingColumn" 
                                       AutoGeneratedColumns="grid_AutoGeneratedColumns"
                                       CanUserAddRows="True" 
                                       CanUserGroup="True"
                                       CanUserFreezeColumns="Left"
                                       FrozenTopRowsCount="1"
                                       RowHeight="30"
                                       ItemsSource="{Binding}">
                        <c1:C1DataGrid.RowDetailsTemplate>
                            <DataTemplate>
                                <TextBlock Text="This is the detail of the row." Margin="4"/>
                            </DataTemplate>
                        </c1:C1DataGrid.RowDetailsTemplate>
                        <c1:C1AdvancedFiltersBehavior.AdvancedFiltersBehavior>
                            <c1:C1AdvancedFiltersBehavior/>
                        </c1:C1AdvancedFiltersBehavior.AdvancedFiltersBehavior>
                    </c1:C1DataGrid>
                </Grid>
            </Border>
        </Grid>
    </Border>
</UserControl>
