<UserControl x:Class="AnimationDemo.Views.FlexPieAnimation"
             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="clr-namespace:AnimationDemo.Views"
             xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <c1:C1Accordion >
            <c1:C1AccordionItem Header="Chart Options" IsExpanded="True" Padding="8">
                <StackPanel Orientation="Horizontal" >
                    <Label Content="Inner Radius:" />
                    <c1:C1NumericBox Margin="2" Minimum="0" Maximum="1" Format="0.0" Increment="0.1" Value="{Binding ElementName=chart,Path=InnerRadius,Mode=TwoWay}" />
                    <Label Content="Offset:" />
                    <c1:C1NumericBox Margin="2" Minimum="0" Maximum="1" Format="0.0" Increment="0.1" Value="{Binding ElementName=chart,Path=Offset,Mode=TwoWay}" />
                    <CheckBox x:Name="cbLabels" Margin="2" Content="Show Labels" VerticalAlignment="Center" Checked="cbLabels_Checked" Unchecked="cbLabels_Checked" />
                </StackPanel>
            </c1:C1AccordionItem>
           
            <c1:C1AccordionItem Header="Animation Options" Padding="8">
                <StackPanel Orientation="Horizontal">
                    <Label Content="Settings:" />
                    <ComboBox Margin="2" x:Name="cbAnimation" VerticalAlignment="Top" Width="80" Height="24" SelectedItem="{Binding AnimationSettings,ElementName=chart}" SelectionChanged="cbAnimation_SelectionChanged" />
                    <Label Content="Load:" />
                    <c1:C1PropertyGrid Margin="4" x:Name="pg1" SelectedObject="{Binding ElementName=chart,Path=AnimationLoad}" />
                    <Label Content="Update:" />
                    <c1:C1PropertyGrid Margin="4" x:Name="pg2" SelectedObject="{Binding ElementName=chart,Path=AnimationUpdate}" AutoGenerateProperties="False" >
                        <c1:C1PropertyGrid.PropertyAttributes>
                            <c1:PropertyAttribute MemberName="Duration"/>
                            <c1:PropertyAttribute MemberName="Easing"/>
                        </c1:C1PropertyGrid.PropertyAttributes>
                    </c1:C1PropertyGrid>
                </StackPanel>
            </c1:C1AccordionItem>
        </c1:C1Accordion>

        <Border Grid.Column="1" Grid.Row="1" >
            <c1:C1FlexPie x:Name="chart" Loaded="chart_Loaded" Margin="8" >
                <c1:C1FlexPie.DataLabel>
                    <c1:PieDataLabel Content="{}{Value}" />
                </c1:C1FlexPie.DataLabel>
            </c1:C1FlexPie>
        </Border>

        <StackPanel Margin="6" Orientation="Horizontal" Grid.Column="1" Grid.Row="2" >
            <Button Margin="2" Content="New Data" Click="New_Click" Width="64" />
            <Button Margin="2" Content="Update" Click="Update_Click" Width="64" />
            <Button Margin="2" Content="+ Item" Click="Add_Click"  Width="64" />
            <Button Margin="2" Content="- Item" Click="Remove_Click"  Width="64" />
        </StackPanel>

    </Grid>
</UserControl>
