<UserControl x:Class="FlexChartExplorer.NumericAxisGrouping"
             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:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:FlexChartExplorer"
             DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.Resources>
            <local:EnumConverter x:Key="enumConverter" />
            <Style TargetType="ComboBox">
                <Setter Property="ItemTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <TextBlock>
                                <TextBlock.Inlines>
                                    <Run Text="Axis Y Group Separator: "/>
                                    <Run Text="{Binding .}" />
                                </TextBlock.Inlines>
                            </TextBlock>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Margin="10">
            <ComboBox ItemsSource="{Binding GroupSeparator}" SelectedValue="{Binding ElementName=flexChart, Path=AxisY.GroupSeparator, Mode=TwoWay, Converter={StaticResource enumConverter}}" Width="240" Margin="10 0 20 0"/>
        </StackPanel>
        <c1:C1FlexChart x:Name="flexChart" Background="White" ChartType="SplineSymbols" BindingX="Month" 
                        ItemsSource="{Binding Data}" Grid.Row="1" ToolTipContent="{}{y}">
            <c1:Series Binding="Temperature" />
            <c1:C1FlexChart.AxisY>
                <c1:Axis Title="Temperature in Celsius" MajorGrid="True" GroupSeparator="Horizontal" Min="0" Max="40"/>
            </c1:C1FlexChart.AxisY>
        </c1:C1FlexChart>
    </Grid>
</UserControl>
