<UserControl x:Class="SparklineSamples.AppearanceSample"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:SparklineSamples"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.DataContext>
            <local:SampleData />
        </Grid.DataContext>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="5" Grid.Row="0">
            <StackPanel.Resources>
                <Style TargetType="CheckBox">
                    <Setter Property="Margin" Value="0 2 10 2" />
                </Style>
                <Style TargetType="TextBlock">
                    <Setter Property="Margin" Value="0 2" />
                    <Setter Property="VerticalAlignment" Value="Center" />
                </Style>
            </StackPanel.Resources>
            <TextBlock Text="ShowMarks :"/>
            <CheckBox x:Name="showMarks" IsChecked="{Binding ElementName=sparkline, Path=ShowMarkers, Mode=TwoWay}"/>
            <TextBlock Text="DisplayXAxis :"/>
            <CheckBox x:Name="displayXAxis" IsChecked="{Binding ElementName=sparkline, Path=DisplayXAxis, Mode=TwoWay}"/>
            <TextBlock Text="ShowFirst : "/>
            <CheckBox x:Name="showFirst" IsChecked="{Binding ElementName=sparkline, Path=ShowFirst, Mode=TwoWay}" />
            <TextBlock Text="ShowLast : "/>
            <CheckBox x:Name="showLast" IsChecked="{Binding ElementName=sparkline, Path=ShowLast, Mode=TwoWay}"/>
            <TextBlock Text="ShowHigh : "/>
            <CheckBox x:Name="showHigh" IsChecked="{Binding ElementName=sparkline, Path=ShowHigh, Mode=TwoWay}"/>
            <TextBlock Text="ShowLow : "/>
            <CheckBox x:Name="showLow" IsChecked="{Binding ElementName=sparkline, Path=ShowLow, Mode=TwoWay}"/>
            <TextBlock Text="ShowNegative : "/>
            <CheckBox x:Name="showNegative" IsChecked="{Binding ElementName=sparkline, Mode=TwoWay, Path=ShowNegative}"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="5" Grid.Row="1">
            <Grid>
                <Grid.Resources>
                    <Style TargetType="ComboBox">
                        <Setter Property="Width" Value="150"/>
                        <Setter Property="Margin" Value="5"/>
                        <Setter Property="SelectedValuePath" Value="Value" />
                        <Setter Property="DisplayMemberPath" Value="Key" />
                    </Style>
                    <Style TargetType="TextBlock">
                        <Setter Property="VerticalAlignment" Value="Center"/>
                        <Setter Property="Margin" Value="0 2 5 2"/>
                    </Style>
                </Grid.Resources>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <TextBlock Text="SparklineType:"/>
                <ComboBox Grid.Column="1" x:Name="sparklineType" ItemsSource="{Binding SparklineTypes}"
                          Foreground="Black" SelectedValue="{Binding ElementName=sparkline, Path=SparklineType}"/>
                <TextBlock Text="SeriesColor : " Grid.Row="0" Grid.Column="2"/>
                <ComboBox x:Name="SeriesColor" Grid.Column="3" ItemsSource="{Binding DefaultColors}"
                          SelectedValue="{Binding ElementName=sparkline, Path=SeriesColor}"
                          Foreground="Black" Grid.Row="0"/>
                <TextBlock Text="AxisColor : " Grid.Row="0" Grid.Column="4"/>
                <ComboBox Margin="5" x:Name="XAxisColor" ItemsSource="{Binding DefaultColors}"
                          SelectedValue="{Binding ElementName=sparkline,Path=AxisColor}"
                          Foreground="Black" Grid.Row="0" Grid.Column="5"/>
                <TextBlock Text="MarksColor : " Grid.Row="1" Grid.Column="0"/>
                <ComboBox x:Name="MarksColor" ItemsSource="{Binding DefaultColors}"
                          SelectedValue="{Binding ElementName=sparkline, Path=MarkersColor}"
                          Foreground="Black" Grid.Row="1" Grid.Column="1"/>
                <TextBlock Text="FirstMarkColor : " Grid.Row="1" Grid.Column="2"/>
                <ComboBox x:Name="FirstMarkColor" ItemsSource="{Binding DefaultColors}"
                          SelectedValue="{Binding ElementName=sparkline, Path=FirstMarkerColor}"
                          Foreground="Black" Grid.Row="1" Grid.Column="3"/>
                <TextBlock Text="LastMarkColor : " Grid.Row="1" Grid.Column="4"/>
                <ComboBox x:Name="LastMarkColor" ItemsSource="{Binding DefaultColors}"
                          SelectedValue="{Binding ElementName=sparkline, Path=LastMarkerColor}"
                          Foreground="Black" Grid.Row="1" Grid.Column="5"/>
                <TextBlock Text="HighMarkColor : " Grid.Row="2" Grid.Column="0"/>
                <ComboBox x:Name="HightMarkColor" ItemsSource="{Binding DefaultColors}"
                          SelectedValue="{Binding ElementName=sparkline, Path=HighMarkerColor}"
                          Foreground="Black" Grid.Row="2" Grid.Column="1"/>
                <TextBlock Text="LowMarkColor : " Grid.Row="2" Grid.Column="2"/>
                <ComboBox x:Name="LowMarkColor" ItemsSource="{Binding DefaultColors}"
                          SelectedValue="{Binding ElementName=sparkline, Path=LowMarkerColor}"
                          Foreground="Black" Grid.Row="2" Grid.Column="3"/>
                <TextBlock Text="NegativeColor : " Grid.Row="2" Grid.Column="4"/>
                <ComboBox x:Name="NegativeColor" ItemsSource="{Binding DefaultColors}"
                          SelectedValue="{Binding ElementName=sparkline, Path=NegativeColor}"
                          Foreground="Black" Grid.Row="2" Grid.Column="5"/>
            </Grid>
        </StackPanel>
        <Grid Grid.Row="3" Width="550">
            <c1:C1Sparkline x:Name="sparkline"
                            Data="{Binding DefaultData}"
                            NegativeColor="#FBB258"
                            LowMarkerColor="#90CD97"
                            HighMarkerColor="#FBB258" 
                            LastMarkerColor="#FBB258"
                            FirstMarkerColor="#F07E6E"
                            MarkersColor="#90CD97"
                            SeriesColor="#FBB258" 
                            AxisColor="#F6AAC9"
                            DisplayXAxis="True"
                            ShowFirst="True"
                            ShowLast="True"
                            ShowLow="True" />
        </Grid>

    </Grid>
</UserControl>
