<Page x:Class="FlexChartCustomization.LegendItems"
      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:local="using:FlexChartCustomization"
      xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
      xmlns:Chart="using:C1.Xaml.Chart"
      mc:Ignorable="d">
    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.DataContext>
            <local:SampleViewModel />
        </Grid.DataContext>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel x:Name="optionPanel" Orientation="Horizontal" Margin="10 0">
            <CheckBox Height="30" x:Name="chbPointsLegends" Content="Display Series Points in Legend" IsChecked="True" Checked="ChbPointsLegends_Changed" Unchecked="ChbPointsLegends_Changed" />
            <CheckBox Height="30" x:Name="chbLegendGroups" Margin="20"  Content="Display Legend Groups" IsChecked="True" Checked="chbLegendGroups_Checked" Unchecked="chbLegendGroups_Checked" />
            <CheckBox Height="30" x:Name="chbLegendCustomIcons"  Margin="20" Content="Display Custom Icons " IsChecked="True" Checked="chbLegendCustomIcons_Checked" Unchecked="chbLegendCustomIcons_Checked" />
            <CheckBox Height="30" x:Name="chbLegendNames"  Margin="20" Content="Display Legend Names" IsChecked="True" Checked="chbLegendNames_Checked" Unchecked="chbLegendNames_Checked" />
        </StackPanel>
        <Chart:C1FlexChart x:Name="flexChart" ItemsSource="{Binding SmartPhoneVendors}" Binding="Shipments" BindingX="Name" Header="Top Smartphone Vendors" Grid.Row="1">
            <Chart:C1FlexChart.HeaderStyle>
                <Chart:ChartStyle FontSize="15" FontFamily="GenericSansSerif"/>
            </Chart:C1FlexChart.HeaderStyle>
            <Chart:C1FlexChart.LegendGroupHeaderStyle>
                <Chart:ChartStyle FontSize="14" FontFamily="GenericSansSarif" FontStyle="Italic"/>
            </Chart:C1FlexChart.LegendGroupHeaderStyle>
        </Chart:C1FlexChart>
    </Grid>
</Page>
