<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:FlexChart101"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Chart="http://schemas.componentone.com/winfx/2006/xaml"
    DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}"
    x:Class="FlexChart101.StylingSeries"
    mc:Ignorable="d">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal">
            <ComboBox Width="200" Margin="10" x:Name="cbPalette" ItemsSource="{Binding DataContext.Palettes}" ItemTemplate="{StaticResource cbPaletteTemplate}"
                      SelectedValue="{Binding ElementName=flexChart, Path=Palette, Mode=TwoWay, Converter={StaticResource enumConverter}}">
            </ComboBox>
        </StackPanel>
        <Chart:C1FlexChart x:Name="flexChart" BindingX="Fruit" ItemsSource="{Binding DataContext.Data}" Grid.Row="1">
            <Chart:Series SeriesName="March" Binding="March" />
            <Chart:Series SeriesName="April" Binding="April" />
            <Chart:Series SeriesName="May" Binding="May" />
        </Chart:C1FlexChart>
    </Grid>
</UserControl>
