<Page x:Class="DrillDown.TreemapSample"
      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"/>
            <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>
        
        <Chart:C1TreeMap
                        x:Name="treemap"
                        Margin="10"
                        DataContext="{Binding TreemapDataLayer}"
                        ItemsSource="{Binding ItemsSource}"
                        Binding="Sales"
                        BindingName="Type"
                        MaxDepth="1"
                        LegendPosition="None"
                        ChildItemsPath="Items">

            <Chart:C1TreeMap.DataLabel>
                <Chart:DataLabel Content="{}{Type}" Position="Center"/>
            </Chart:C1TreeMap.DataLabel>
        </Chart:C1TreeMap>
    </Grid>
</Page>
