<Page x:Class="DrillDown.SunburstSample"
      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:DrillDown"
      xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
      xmlns:Chart="using:C1.Xaml.Chart"
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300">

    <Grid Margin="10">
        <Grid.Resources>
            <local:IntToVisibilityConverter x:Key="ITVConverter"/>
            <local:ShowNavigateConverter x:Key="SNConverter"/>
            <local:Select2VisibilityConverter x:Key="Select2VisibilityConverter"/>
            <Style TargetType="StackPanel">
                <Setter Property="Orientation" Value="Horizontal"/>
                <Setter Property="Margin" Value="0 5"/>
            </Style>
            <Style TargetType="ComboBox">
                <Setter Property="Margin" Value="10 0"/>
            </Style>
        </Grid.Resources>

        <Grid Margin="10">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Chart:C1Sunburst
                        x:Name="sunburst"
                        Grid.Row="1"
                        ToolTip="{x:Null}"
                        DataContext="{Binding SunburstDataLayer}"
                        ItemsSource="{Binding ItemsSource}"
                        Binding="{Binding Binding}"
                        BindingName="{Binding BindingX}"
                        InnerRadius="0.2"
                        ChildItemsPath="Items"
                        Palette="Custom"
                        CustomPalette="{Binding CustomPalette}"
                        Visibility="{Binding ElementName=tabSunburst, Path=IsSelected, Converter={StaticResource Select2VisibilityConverter}}"
                        Drilldown="True"
                        >
                <Chart:C1Sunburst.DataLabel>
                    <Chart:PieDataLabel Content="{}{name}" Position="Center"/>
                </Chart:C1Sunburst.DataLabel>
            </Chart:C1Sunburst>
        </Grid>
    </Grid>
</Page>
