<UserControl x:Class="DrillDown.SunburstDemo"
             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:DrillDown"
             xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Margin="10">
        <Grid.Resources>
            <local:IntToVisibilityConverter x:Key="ITVConverter"/>
            <local:ShowNavigateConverter x:Key="SNConverter"/>
            <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>
            <TextBlock Text="Click a slice to drill down into the details, or click with right button to return to a higher level."/>
            <c1: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}"
                        Drilldown="True">
                <c1:C1Sunburst.DataLabel>
                    <c1:PieDataLabel Content="{}{name}" Position="Center"/>
                </c1:C1Sunburst.DataLabel>
            </c1:C1Sunburst>
        </Grid>
    </Grid>
</UserControl>
