﻿<UserControl x:Class="Wpf.PieChart.DropDowns.PieDropDownSample"
             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:Wpf.PieChart.DropDowns"
             xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.DataContext>
        <local:DropDownViewModel></local:DropDownViewModel>
    </UserControl.DataContext>
    <UserControl.Resources>
        <Style TargetType="lvc:PieSeries">
            <Setter Property="StrokeThickness" Value="0"></Setter>
            <Setter Property="DataLabels" Value="True"></Setter>
            <Setter Property="LabelPosition" Value="OutsideSlice"></Setter>
            <Setter Property="Foreground" Value="#303030"></Setter>
            <Setter Property="FontSize" Value="16"></Setter>
        </Style>
    </UserControl.Resources>
    <Grid>
        <Button VerticalAlignment="Top" HorizontalAlignment="Left" 
                Command="{Binding GoBackCommand}">
            Go Back
        </Button>
        <TextBlock VerticalAlignment="Bottom" TextWrapping="Wrap">Click in the black slice to open more content, click back to go to the previous state</TextBlock>
        <lvc:PieChart Series="{Binding Series}" 
                      DataClickCommand="{Binding SliceClickCommand}"
                      Margin="40"
                      DataTooltip="{x:Null}"
                      AnimationsSpeed="0:0:0.25">
            <lvc:PieChart.AxisY>
                <lvc:Axis LabelFormatter="{Binding Formatter}"></lvc:Axis>
            </lvc:PieChart.AxisY>
        </lvc:PieChart>
    </Grid>
</UserControl>
