<?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:telerikPrimitives="clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives"
             xmlns:telerikDataControls="clr-namespace:Telerik.XamarinForms.DataControls;assembly=Telerik.XamarinForms.DataControls"
             xmlns:telerikChart="clr-namespace:Telerik.XamarinForms.Chart;assembly=Telerik.XamarinForms.Chart"
             xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
             xmlns:telerikGauges="clr-namespace:Telerik.XamarinForms.DataVisualization.Gauges;assembly=Telerik.XamarinForms.DataVisualization"
             xmlns:telerikDataGrid="clr-namespace:Telerik.XamarinForms.DataGrid;assembly=Telerik.XamarinForms.DataGrid"
             xmlns:telerikCommon="clr-namespace:Telerik.XamarinForms.Common;assembly=Telerik.XamarinForms.Common"
             xmlns:local="clr-namespace:GaugeXF_1171097.Portable"
             x:Class="GaugeXF_1171097.Portable.StartPage">


    <VisualElement.Resources>
        <ResourceDictionary>
            <telerikCommon:RadPathGeometry x:Key="shape1">
                <telerikCommon:RadPathFigure StartPoint="0.3, 0.5">
                    <telerikCommon:RadArcSegment Center="0.5, 0.5" Size="0.4, 0.4" SweepAngle="-180" />
                </telerikCommon:RadPathFigure>
            </telerikCommon:RadPathGeometry>
            <telerikCommon:RadPathGeometry x:Key="shape2">
                <telerikCommon:RadPathFigure StartPoint="0.5, 0.5">
                    <telerikCommon:RadLineSegment Point="0.6, 0.5" />
                </telerikCommon:RadPathFigure>
                <telerikCommon:RadPathFigure StartPoint="0.65, 0.5">
                    <telerikCommon:RadLineSegment Point="0.75, 0.5" />
                </telerikCommon:RadPathFigure>
                <telerikCommon:RadPathFigure StartPoint="0.8, 0.5">
                    <telerikCommon:RadLineSegment Point="0.9, 0.5" />
                </telerikCommon:RadPathFigure>
            </telerikCommon:RadPathGeometry>
        </ResourceDictionary>
    </VisualElement.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <local:SemiCircleGauge Margin="0, 0, 0, 40">
            <telerikGauges:RadRadialGauge x:Name="gauge" StartAngle="180" SweepAngle="180" >
                <telerikGauges:RadRadialGauge.Axis>
                    <telerikGauges:GaugeLinearAxis Minimum="0" 
                                                   Maximum="50" 
                                                   Step="50"
                                                   StrokeThickness="0" />
                </telerikGauges:RadRadialGauge.Axis>
                <telerikGauges:RadRadialGauge.Indicators>
                    <telerikGauges:GaugeNeedleIndicator Fill="DarkRed" Value="0" Shape="{StaticResource shape1}" />
                    <telerikGauges:GaugeNeedleIndicator Value="28" Shape="{StaticResource shape2}" StrokeThickness="4" />
                    <telerikGauges:GaugeBarIndicator Value="12" Offset="0" IsOffsetRelative="True">
                        <telerikGauges:GaugeBarIndicator.GradientStops>
                            <telerikCommon:RadGradientStop Offset="0" Color="Red" />
                            <telerikCommon:RadGradientStop Offset="1" Color="Orange" />
                        </telerikGauges:GaugeBarIndicator.GradientStops>
                    </telerikGauges:GaugeBarIndicator>
                </telerikGauges:RadRadialGauge.Indicators>
                <telerikGauges:RadRadialGauge.Ranges>
                    <telerikGauges:GaugeRangesDefinition Offset="0">
                        <telerikGauges:GaugeRange From="0" To="50" Color="Gray" />
                    </telerikGauges:GaugeRangesDefinition>
                </telerikGauges:RadRadialGauge.Ranges>
            </telerikGauges:RadRadialGauge>
        </local:SemiCircleGauge>
        <Label Text="12 thousand" HorizontalTextAlignment="Center" VerticalOptions="End" />
    </Grid>
</ContentPage>