<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:xuni="clr-namespace:Xuni.Forms.FlexPie;assembly=Xuni.Forms.FlexPie"
             xmlns:common="clr-namespace:FlexPieDemo.Data.Views.Common;assembly=FlexPie101.Data"
             x:Class="FlexPieDemo.Data.Views.Samples.DataLabel" x:Name="page"
            Padding="20">
  <StackLayout>
    <Label BindingContext="{x:Reference page}" Text="{Binding Title}" IsVisible="{StaticResource TitleVisible}" HorizontalOptions="Center" Font="Large"/>
    <StackLayout Orientation="Horizontal">
      <Label Text="Label Position" VerticalOptions="Center" />
      <Picker x:Name="pickPostion" Title="Label Position" HorizontalOptions="FillAndExpand" SelectedIndexChanged = "pickPostion_SelectedIndexChanged" />
    </StackLayout>
    <xuni:FlexPie x:Name="flexPie" BindingName="Name" Binding="Value" IsAnimated="False" ShowTooltips="False" SliceBorderWidth="1" VerticalOptions="FillAndExpand">
      <xuni:FlexPie.DataLabel>
        <xuni:PieDataLabel>
          <xuni:PieDataLabel.ContentTemplate>
            <DataTemplate>
              <Frame BackgroundColor="#99FFFFFF" Padding="5">
                <Label Text="{Binding Value, StringFormat='{0:F2}'}" TextColor="Red" FontSize="20" ></Label>
              </Frame>
            </DataTemplate>
          </xuni:PieDataLabel.ContentTemplate>
        </xuni:PieDataLabel>
      </xuni:FlexPie.DataLabel>
    </xuni:FlexPie>
  </StackLayout>
</ContentPage>