<Page x:Class="SunburstIntro.Group"
      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:SunburstIntro"
      xmlns:Chart="using:C1.Xaml.Chart"
      mc:Ignorable="d"
      d:DesignHeight="300" d:DesignWidth="300">
    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" Margin="10">
        <Grid.DataContext>
            <local:SunburstViewModel />
        </Grid.DataContext>
        <Chart:C1Sunburst x:Name="sunburst" ItemsSource="{Binding View}" Binding="Value">
            <Chart:C1Sunburst.DataLabel>
                <Chart:PieDataLabel Position="Center" Content="{}{name}"/>
            </Chart:C1Sunburst.DataLabel>
        </Chart:C1Sunburst>
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup>
                <VisualState x:Name="NarrowLayout">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="0" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="sunburst.LegendPosition" Value="Bottom" />
                        <Setter Target="sunburst.FontSize" Value="10" />
                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="WideLayout">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="540" />
                    </VisualState.StateTriggers>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</Page>