<?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"
             x:Class="FlexPieDemo.Data.Views.Samples.LegendAndTitlesSample" x:Name="page"
            Padding="20">
  <StackLayout>
    <Label BindingContext="{x:Reference page}" Text="{Binding Title}" IsVisible="{StaticResource TitleVisible}" HorizontalOptions="Center" Font="Large"/>
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="50*" />
        <ColumnDefinition Width="50*" />
      </Grid.ColumnDefinitions>

      <StackLayout  Grid.Column="0" Orientation="Vertical">
        <Label Text="Header"/>
        <Entry BindingContext="{x:Reference flexPie}" Text="{Binding HeaderText,Mode=TwoWay}" />
      </StackLayout>
      <StackLayout  Grid.Column="1" Orientation="Vertical" >
        <Label Text="Footer"/>
        <Entry BindingContext="{x:Reference flexPie}" Text="{Binding FooterText,Mode=TwoWay}" />
      </StackLayout>
      <StackLayout  Grid.Row="1">
        <Label Text="Legend Position"/>
        <Picker  x:Name="pickerLegendPosition" />
      </StackLayout>
    </Grid>
    <xuni:FlexPie SelectedItemOffset=".2"
                  SelectedBorderWidth="3"
                  SelectedDashes="1,0"
                  SelectionMode="Point"
                  BindingName = "Name" Binding = "Value"
                  HeaderText="Fruit By Value" HeaderTextColor="#666666" HeaderFontSize="20"
                  FooterText="2015 GrapeCity, inc." FooterTextColor="#666666"
                  x:Name="flexPie"
                  VerticalOptions="FillAndExpand"/>
  </StackLayout>
</ContentPage>