<UserControl
    x:Class="FlexChart101.ChartTypes"
    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}}"
    mc:Ignorable="d">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel x:Name="cbsPanel" Orientation="Horizontal">
            <ComboBox Width="200" Margin="10 5" x:Name="cbChartType" ItemsSource="{Binding DataContext.Types}" ItemTemplate="{StaticResource cbChartTypeTemplate}"
                      SelectedValue="{Binding ElementName=flexChart, Path=ChartType, Mode=TwoWay, Converter={StaticResource enumConverter}}">
            </ComboBox>
            <ComboBox Width="200" Margin="5 5 10 5" x:Name="cbStacked" ItemsSource="{Binding DataContext.Stackings}" ItemTemplate="{StaticResource cbStackedTemplate}"
                      SelectedValue="{Binding ElementName=flexChart, Path=Stacking, Mode=TwoWay, Converter={StaticResource enumConverter}}">
            </ComboBox>
            <CheckBox x:Name="cbRotate" Content="Rotate" VerticalAlignment="Center" IsChecked="{Binding ElementName=flexChart, Path=Rotated, Mode=TwoWay}">
            </CheckBox>
        </StackPanel>
        <Chart:C1FlexChart x:Name="flexChart" ItemsSource="{Binding DataContext.Data}" BindingX="Fruit" 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>
