<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="FlexGrid101.CustomCells" x:Name="page"
             xmlns:xuni="clr-namespace:Xuni.Forms.FlexGrid;assembly=Xuni.Forms.FlexGrid"
             xmlns:gauge="clr-namespace:Xuni.Forms.Gauge;assembly=Xuni.Forms.Gauge">
    <Grid RowSpacing="0">
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition />
      </Grid.RowDefinitions>
      <Label BindingContext="{x:Reference page}" Text="{Binding Title}" IsVisible="{StaticResource TitleVisible}" HorizontalOptions="Center" Font="Large"/>
      <xuni:FlexGrid x:Name="grid" AutoGenerateColumns="False" IsReadOnly="True" Grid.Row="1">
        <xuni:FlexGrid.Columns>
          <xuni:GridColumn Binding="FirstName" Width="*"/>
          <xuni:GridColumn Binding="LastName" Width="*"/>
          <xuni:GridColumn Binding="OrderTotal" Header="Order Total" Width="*">
            <xuni:GridColumn.CellTemplate>
              <DataTemplate>
                       
                <gauge:XuniRadialGauge IsAnimated="False" Value="{Binding OrderTotal}" Min="0" Max="10000" ShowText="None" ShowRanges="False" WidthRequest="50" HeightRequest="50">
                  <gauge:XuniRadialGauge.Ranges>
                    <gauge:GaugeRange Min="0" Max="2000" Color="Red"/>
                    <gauge:GaugeRange Min="2000" Max="5000" Color="Yellow"/>
                    <gauge:GaugeRange Min="50000" Max="10000" Color="Green"/>
                  </gauge:XuniRadialGauge.Ranges>
                </gauge:XuniRadialGauge>

              </DataTemplate>
            </xuni:GridColumn.CellTemplate>
          </xuni:GridColumn>
        </xuni:FlexGrid.Columns>
      </xuni:FlexGrid>
    </Grid>
</ContentPage>