<!--// Copyright © ComponentOne LLC.
// This file is part of the ComponentOne Studio Silverlight Edition
// Please visit www.componentone.com for details
// All other rights reserved.
-->
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c1="using:C1.Xaml.FlexGrid">
    <ResourceDictionary.ThemeDictionaries>
        <ResourceDictionary x:Key="Default">
            <SolidColorBrush x:Key="FlexGridColumnHeaderBackgroundThemeBrush" Color="#FF5D5D5D"/>
            <SolidColorBrush x:Key="FlexGridRowHeaderBackgroundThemeBrush" Color="#FF5D5D5D"/>
            <SolidColorBrush x:Key="HeaderGridLinesThemeBrush" Color="#FF474747"/>
            <SolidColorBrush x:Key="FlexGridHeaderForegroundThemeBrush" Color="#FFFFFFFF"/>
            <Thickness x:Key="FlexGridBorderThemeThickness">0</Thickness>
        </ResourceDictionary>
        <ResourceDictionary x:Key="Light">
            <SolidColorBrush x:Key="FlexGridColumnHeaderBackgroundThemeBrush" Color="#FFE8E8E8"/>
            <SolidColorBrush x:Key="FlexGridRowHeaderBackgroundThemeBrush" Color="#FFE8E8E8"/>
            <SolidColorBrush x:Key="HeaderGridLinesThemeBrush" Color="#FFCBCBCB"/>
            <SolidColorBrush x:Key="FlexGridHeaderForegroundThemeBrush" Color="#1A1A1A"/>
            <Thickness x:Key="FlexGridBorderThemeThickness">0</Thickness>
        </ResourceDictionary>
        <ResourceDictionary x:Key="HighContrast">
            <SolidColorBrush x:Key="FlexGridColumnHeaderBackgroundThemeBrush" Color="Black"/>
            <SolidColorBrush x:Key="FlexGridRowHeaderBackgroundThemeBrush" Color="Black"/>
            <SolidColorBrush x:Key="HeaderGridLinesThemeBrush" Color="White"/>
            <SolidColorBrush x:Key="FlexGridHeaderForegroundThemeBrush" Color="#FFFFFF00"/>
            <Thickness x:Key="FlexGridBorderThemeThickness">0</Thickness>
        </ResourceDictionary>
        <ResourceDictionary x:Key="HighContrastBlack">
            <SolidColorBrush x:Key="FlexGridColumnHeaderBackgroundThemeBrush" Color="Black"/>
            <SolidColorBrush x:Key="FlexGridRowHeaderBackgroundThemeBrush" Color="Black"/>
            <SolidColorBrush x:Key="HeaderGridLinesThemeBrush" Color="White"/>
            <SolidColorBrush x:Key="FlexGridHeaderForegroundThemeBrush" Color="White"/>
            <Thickness x:Key="FlexGridBorderThemeThickness">0</Thickness>
        </ResourceDictionary>
        <ResourceDictionary x:Key="HighContrastWhite">
            <SolidColorBrush x:Key="FlexGridColumnHeaderBackgroundThemeBrush" Color="White"/>
            <SolidColorBrush x:Key="FlexGridRowHeaderBackgroundThemeBrush" Color="White"/>
            <SolidColorBrush x:Key="HeaderGridLinesThemeBrush" Color="Black"/>
            <SolidColorBrush x:Key="FlexGridHeaderForegroundThemeBrush" Color="Black"/>
            <Thickness x:Key="FlexGridBorderThemeThickness">0</Thickness>
        </ResourceDictionary>
    </ResourceDictionary.ThemeDictionaries>
    <!-- brushes -->
    <SolidColorBrush x:Key="_CursorBackground" Color="#ffbadde9"/>

    <!-- control definition -->
    <Style TargetType="c1:C1FlexGrid">
        <Setter Property="Background" Value="{ThemeResource ApplicationPageBackgroundThemeBrush}" />
        <Setter Property="Foreground" Value="{ThemeResource ApplicationForegroundThemeBrush}" />
        <Setter Property="RowBackground" Value="Transparent"/>
        <Setter Property="ColumnResizeIconStyle">
            <Setter.Value>
                <Style TargetType="ContentControl">
                    <Setter Property="Foreground" Value="{ThemeResource FlexGridHeaderForegroundThemeBrush}" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ContentControl">
                                <Path Data="M1.5,11 C2.32843,11 3,11.6716 3,12.5 C3,13.3284 2.32843,14 1.5,14 C0.671573,14 0,13.3284 0,12.5 C0,11.6716 0.671573,11 1.5,11 z M1.5,6 C2.32843,6 3,6.67157 3,7.5 C3,8.32843 2.32843,9 1.5,9 C0.671573,9 0,8.32843 0,7.5 C0,6.67157 0.671573,6 1.5,6 z M1.5,0 C2.32843,0 3,0.671573 3,1.5 C3,2.32843 2.32843,3 1.5,3 C0.671573,3 0,2.32843 0,1.5 C0,0.671573 0.671573,0 1.5,0 z" Margin="6,2,2,2" Fill="{TemplateBinding Foreground}" Stretch="Uniform" Width="3" VerticalAlignment="Center"/>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="AlternatingRowBackground" Value="Transparent"/>
        <Setter Property="HeaderGridLinesBrush" Value="{ThemeResource HeaderGridLinesThemeBrush}"/>
        <Setter Property="BorderBrush" Value="{ThemeResource HeaderGridLinesThemeBrush}"/>
        <Setter Property="GridLinesBrush" Value="{ThemeResource ButtonBackgroundThemeBrush}"/>
        <Setter Property="GroupRowBackground" Value="{ThemeResource FlexGridRowHeaderBackgroundThemeBrush}"/>
        <Setter Property="CursorBackground" Value="{ThemeResource ListBoxItemSelectedBackgroundThemeBrush}"/>
        <Setter Property="SelectionBackground" Value="{ThemeResource ListViewItemDragBackgroundThemeBrush}"/>
        <Setter Property="SelectionForeground" Value="{ThemeResource ListBoxItemSelectedForegroundThemeBrush}"/>
        <Setter Property="RowHeaderBackground" Value="{ThemeResource FlexGridRowHeaderBackgroundThemeBrush}"/>
        <Setter Property="ColumnHeaderBackground" Value="{ThemeResource FlexGridColumnHeaderBackgroundThemeBrush}"/>
        <Setter Property="GroupRowBackground" Value="{ThemeResource FlexGridRowHeaderBackgroundThemeBrush}"/>
        <Setter Property="TopLeftCellBackground" Value="{ThemeResource FlexGridColumnHeaderBackgroundThemeBrush}"/>
        <Setter Property="BottomRightCellBackground" Value="{ThemeResource TextBoxBackgroundThemeBrush}"/>
        <Setter Property="RowHeaderForeground" Value="{ThemeResource FlexGridHeaderForegroundThemeBrush}"/>
        <Setter Property="ColumnHeaderForeground" Value="{ThemeResource FlexGridHeaderForegroundThemeBrush}"/>
        <Setter Property="GroupRowForeground" Value="{ThemeResource FlexGridHeaderForegroundThemeBrush}"/>
        <Setter Property="BorderThickness" Value="{ThemeResource FlexGridBorderThemeThickness}"/>
        <Setter Property="Padding" Value="12,4" />
        <Setter Property="MinRowHeight" Value="35" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
        <Setter Property="SelectionAdornerFill" Value="White" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1FlexGrid">
                    <Border
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}">
                        <ScrollViewer x:Name="_scrollViewer" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="c1:C1FlexGridEditorFlyoutPresenter">
        <!-- properties -->
        <Setter Property="Background" Value="{ThemeResource FlyoutBackgroundThemeBrush}"/>
        <!--<Setter Property="Foreground" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>-->
        <!--<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilyNormal}"/>
        <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeLarge}"/>-->
        <!-- template -->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1:C1FlexGridEditorFlyoutPresenter">
                    <Border x:Name="_root" Background="{TemplateBinding Background}">
                        <Grid Margin="8 32 8 0">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <TextBox x:Name="_textBox" Grid.Row="0" />
                            <GridView x:Name="_listView" Grid.Row="1">
                                <GridView.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <ItemsStackPanel />
                                    </ItemsPanelTemplate>
                                </GridView.ItemsPanel>
                                <GridView.ItemContainerStyle>
                                    <Style TargetType="GridViewItem">
                                        <Setter Property="Margin" Value="4"/>
                                        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                                        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                                    </Style>
                                </GridView.ItemContainerStyle>
                                <GridView.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding}" />
                                    </DataTemplate>
                                </GridView.ItemTemplate>
                            </GridView>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>

