Esempio n. 1
0
        public override View GetSampleContent(Context con)
        {
            SfCircularGauge sfCircularGauge = new SfCircularGauge(con);

            ObservableCollection <CircularScale> circularScales = new ObservableCollection <CircularScale>();
            CircularScale scale = new CircularScale();

            scale.StartValue            = 0;
            scale.EndValue              = 100;
            scale.Interval              = 10;
            scale.StartAngle            = 135;
            scale.SweepAngle            = 270;
            scale.RimWidth              = 10;
            scale.RimColor              = Color.ParseColor("#E0E0E0");
            scale.LabelColor            = Color.Black;
            scale.LabelOffset           = 0.8;
            scale.ShowTicks             = false;
            scale.MinorTicksPerInterval = 0;

            ObservableCollection <CircularPointer> pointers = new ObservableCollection <CircularPointer>();

            pointer              = new NeedlePointer();
            pointer.Value        = 60;
            pointer.KnobRadius   = 10;
            pointer.Color        = Color.ParseColor("#757575");
            pointer.KnobColor    = Color.ParseColor("#757575");
            pointer.LengthFactor = 0.6;
            pointer.Type         = Com.Syncfusion.Gauges.SfCircularGauge.Enums.NeedleType.Triangle;
            pointers.Add(pointer);

            scale.CircularPointers = pointers;
            circularScales.Add(scale);
            sfCircularGauge.CircularScales = circularScales;

            sfCircularGauge.SetBackgroundColor(Color.White);

            LinearLayout linearLayout = new LinearLayout(con);

            linearLayout.AddView(sfCircularGauge);
            linearLayout.SetPadding(30, 30, 30, 30);
            linearLayout.SetBackgroundColor(Color.White);
            return(linearLayout);
        }
Esempio n. 2
0
        public override View GetSampleContent(Context con)
        {
            SfCircularGauge sfCircularGauge = new SfCircularGauge(con);

            ObservableCollection <Header> headers = new ObservableCollection <Header>();
            Header header = new Header();

            header.Text      = "Inverted Traingle";
            header.TextSize  = 18;
            header.TextColor = Color.Black;
            header.Position  = new PointF((float)0.5, (float)0.6);
            headers.Add(header);
            sfCircularGauge.Headers = headers;

            ObservableCollection <CircularScale> circularScales = new ObservableCollection <CircularScale>();
            CircularScale scale = new CircularScale();

            scale.StartAngle            = 180;
            scale.SweepAngle            = 180;
            scale.ScaleStartOffset      = 0.7;
            scale.ScaleEndOffset        = 0.68;
            scale.StartValue            = 0;
            scale.EndValue              = 100;
            scale.RimColor              = Color.Gray;
            scale.Interval              = 50;
            scale.ShowLabels            = false;
            scale.ShowTicks             = false;
            scale.MinorTicksPerInterval = 0;

            ObservableCollection <CircularPointer> pointers = new ObservableCollection <CircularPointer>();
            MarkerPointer markerPointer = new MarkerPointer();

            markerPointer.Value       = 80;
            markerPointer.Color       = Color.ParseColor("#00bdae");
            markerPointer.Offset      = 0.7;
            markerPointer.MarkerShape = Com.Syncfusion.Gauges.SfCircularGauge.Enums.MarkerShape.InvertedTriangle;
            pointers.Add(markerPointer);

            scale.CircularPointers = pointers;
            circularScales.Add(scale);

            sfCircularGauge.CircularScales = circularScales;

            sfCircularGauge.SetBackgroundColor(Color.White);
            //triangle

            SfCircularGauge sfCircularGauge1 = new SfCircularGauge(con);

            ObservableCollection <Header> headers1 = new ObservableCollection <Header>();
            Header header1 = new Header();

            header1.Text      = "Traingle";
            header1.TextSize  = 18;
            header1.TextColor = Color.Black;
            header1.Position  = new PointF((float)0.5, (float)0.6);
            headers1.Add(header1);
            sfCircularGauge1.Headers = headers1;

            ObservableCollection <CircularScale> circularScales1 = new ObservableCollection <CircularScale>();
            CircularScale scale1 = new CircularScale();

            scale1.StartAngle            = 180;
            scale1.SweepAngle            = 180;
            scale1.ScaleStartOffset      = 0.7;
            scale1.ScaleEndOffset        = 0.68;
            scale1.StartValue            = 0;
            scale1.EndValue              = 100;
            scale1.RimColor              = Color.Gray;
            scale1.Interval              = 50;
            scale1.ShowLabels            = false;
            scale1.ShowTicks             = false;
            scale1.MinorTicksPerInterval = 0;

            ObservableCollection <CircularPointer> pointers1 = new ObservableCollection <CircularPointer>();
            MarkerPointer markerPointer1 = new MarkerPointer();

            markerPointer1.Value       = 80;
            markerPointer1.Color       = Color.Green;
            markerPointer1.Offset      = 0.68;
            markerPointer1.MarkerShape = Com.Syncfusion.Gauges.SfCircularGauge.Enums.MarkerShape.Triangle;
            pointers1.Add(markerPointer1);

            scale1.CircularPointers = pointers1;
            circularScales1.Add(scale1);

            sfCircularGauge1.CircularScales = circularScales1;

            sfCircularGauge1.SetBackgroundColor(Color.White);

            //range pointer

            SfCircularGauge sfCircularGauge2 = new SfCircularGauge(con);

            ObservableCollection <Header> headers2 = new ObservableCollection <Header>();
            Header header2 = new Header();

            header2.Text      = "Range Pointer";
            header2.TextSize  = 18;
            header2.TextColor = Color.Black;
            header2.Position  = new PointF((float)0.5, (float)0.6);
            headers2.Add(header2);
            sfCircularGauge2.Headers = headers2;

            ObservableCollection <CircularScale> circularScales2 = new ObservableCollection <CircularScale>();
            CircularScale scale2 = new CircularScale();

            scale2.StartAngle            = 180;
            scale2.SweepAngle            = 180;
            scale2.StartValue            = 0;
            scale2.EndValue              = 100;
            scale2.RadiusFactor          = 0.7;
            scale2.RimColor              = Color.Gray;
            scale2.Interval              = 50;
            scale2.ShowLabels            = false;
            scale2.ShowTicks             = false;
            scale2.RimWidth              = 3;
            scale2.MinorTicksPerInterval = 0;

            ObservableCollection <CircularPointer> pointers2 = new ObservableCollection <CircularPointer>();
            RangePointer rangePointer = new RangePointer();

            rangePointer.Value           = 60;
            rangePointer.Color           = Color.ParseColor("#FF2680");
            rangePointer.Offset          = 0.6;
            rangePointer.Width           = 20;
            rangePointer.EnableAnimation = false;
            pointers2.Add(rangePointer);

            scale2.CircularPointers = pointers2;
            circularScales2.Add(scale2);

            sfCircularGauge2.CircularScales = circularScales2;

            sfCircularGauge2.SetBackgroundColor(Color.White);

            //needlepointer

            SfCircularGauge sfCircularGauge3 = new SfCircularGauge(con);

            ObservableCollection <Header> headers3 = new ObservableCollection <Header>();
            Header header3 = new Header();

            header3.Text      = "Needle Pointer";
            header3.TextSize  = 18;
            header3.TextColor = Color.Black;
            header3.Position  = new PointF((float)0.5, (float)0.6);
            headers3.Add(header3);
            sfCircularGauge3.Headers = headers3;

            ObservableCollection <CircularScale> circularScales3 = new ObservableCollection <CircularScale>();
            CircularScale scale3 = new CircularScale();

            scale3.StartAngle            = 180;
            scale3.SweepAngle            = 180;
            scale3.StartValue            = 0;
            scale3.EndValue              = 100;
            scale3.RadiusFactor          = 0.7;
            scale3.RimColor              = Color.Gray;
            scale3.Interval              = 50;
            scale3.ShowLabels            = false;
            scale3.ShowTicks             = false;
            scale3.RimWidth              = 3;
            scale3.MinorTicksPerInterval = 0;

            ObservableCollection <CircularPointer> pointers3 = new ObservableCollection <CircularPointer>();
            NeedlePointer needlePointer = new NeedlePointer();

            needlePointer.Value        = 80;
            needlePointer.Color        = Color.Purple;
            needlePointer.LengthFactor = 0.7;
            needlePointer.KnobRadius   = 0;
            needlePointer.Width        = 10;
            needlePointer.Type         = NeedleType.Triangle;
            pointers3.Add(needlePointer);

            scale3.CircularPointers = pointers3;
            circularScales3.Add(scale3);

            sfCircularGauge3.CircularScales = circularScales3;

            sfCircularGauge3.SetBackgroundColor(Color.White);

            SfCircularGauge sfCircularGauge4 = new SfCircularGauge(con);

            ObservableCollection <Header> headers4 = new ObservableCollection <Header>();
            Header header4 = new Header();

            header4.Text      = "Multiple Needle";
            header4.TextSize  = 18;
            header4.TextColor = Color.Black;
            header4.Position  = new PointF((float)0.5, (float)0.7);
            headers4.Add(header4);
            sfCircularGauge4.Headers = headers4;

            ObservableCollection <CircularScale> circularScales4 = new ObservableCollection <CircularScale>();
            CircularScale scale4 = new CircularScale();

            scale4.StartAngle            = 180;
            scale4.SweepAngle            = 180;
            scale4.StartValue            = 0;
            scale4.EndValue              = 100;
            scale4.RadiusFactor          = 0.7;
            scale4.RimColor              = Color.Gray;
            scale4.Interval              = 50;
            scale4.ShowLabels            = false;
            scale4.ShowTicks             = false;
            scale4.RimWidth              = 3;
            scale4.MinorTicksPerInterval = 0;

            ObservableCollection <CircularPointer> pointers4 = new ObservableCollection <CircularPointer>();
            NeedlePointer needlePointer1 = new NeedlePointer();

            needlePointer1.Value            = 40;
            needlePointer1.Color            = Color.ParseColor("#ed7d31");
            needlePointer1.LengthFactor     = 0.5;
            needlePointer1.KnobRadiusFactor = 0.05;
            needlePointer1.KnobColor        = Color.White;
            needlePointer1.Width            = 10;
            needlePointer1.Type             = NeedleType.Triangle;
            needlePointer1.TailStrokeColor  = Color.ParseColor("#ed7d31");
            needlePointer1.KnobStrokeWidth  = 2;
            needlePointer1.KnobStrokeColor  = Color.ParseColor("#ed7d31");
            pointers4.Add(needlePointer1);

            NeedlePointer needlePointer2 = new NeedlePointer();

            needlePointer2.Value            = 70;
            needlePointer2.Color            = Color.ParseColor("#ed7d31");
            needlePointer2.LengthFactor     = 0.6;
            needlePointer2.KnobRadiusFactor = 0.05;
            needlePointer2.KnobColor        = Color.White;
            needlePointer2.Width            = 10;
            needlePointer2.Type             = NeedleType.Triangle;
            needlePointer2.TailStrokeColor  = Color.ParseColor("#ed7d31");
            needlePointer2.KnobStrokeWidth  = 2;
            needlePointer2.KnobStrokeColor  = Color.ParseColor("#ed7d31");
            pointers4.Add(needlePointer2);

            scale4.CircularPointers = pointers4;
            circularScales4.Add(scale4);

            sfCircularGauge4.CircularScales = circularScales4;

            sfCircularGauge4.SetBackgroundColor(Color.White);

            LinearLayout linearLayout = new LinearLayout(con);

            linearLayout.Orientation      = Orientation.Vertical;
            linearLayout.LayoutParameters = new LayoutParams(LayoutParams.MatchParent, LayoutParams.MatchParent);
            linearLayout.AddView(sfCircularGauge, LayoutParams.WrapContent, (int)(250 * con.Resources.DisplayMetrics.Density));
            linearLayout.AddView(sfCircularGauge1, LayoutParams.WrapContent, (int)(250 * con.Resources.DisplayMetrics.Density));
            linearLayout.AddView(sfCircularGauge2, LayoutParams.WrapContent, (int)(250 * con.Resources.DisplayMetrics.Density));
            linearLayout.AddView(sfCircularGauge3, LayoutParams.WrapContent, (int)(250 * con.Resources.DisplayMetrics.Density));
            linearLayout.AddView(sfCircularGauge4, LayoutParams.WrapContent, (int)(250 * con.Resources.DisplayMetrics.Density));

            linearLayout.SetPadding(30, 30, 30, 30);
            ScrollView mainView = new ScrollView(con);

            mainView.AddView(linearLayout);
            return(mainView);
        }
Esempio n. 3
0
        public override View GetSampleContent(Context context)
        {
            deviceDensity = context.Resources.DisplayMetrics.Density;
            SfCircularGauge sfCircularGauge = new SfCircularGauge(context);

            ObservableCollection <Header> headers = new ObservableCollection <Header>();

            header           = new Header();
            header.Text      = "08" + " h" + " 00" + " min";
            header.TextSize  = 25;
            header.TextColor = Color.ParseColor("#FF4500");
            header.TextStyle = Typeface.DefaultBold;
            header.Position  = new PointF((float)0.5, (float)0.5);
            headers.Add(header);
            sfCircularGauge.Headers = headers;

            ObservableCollection <CircularScale> circularScales = new ObservableCollection <CircularScale>();
            CircularScale scale = new CircularScale();

            scale.StartValue            = 0;
            scale.EndValue              = 12;
            scale.Interval              = 1;
            scale.StartAngle            = 270;
            scale.SweepAngle            = 360;
            scale.LabelOffset           = 0.67;
            scale.ScaleStartOffset      = 0.9;
            scale.ScaleEndOffset        = 0.8;
            scale.ShowFirstLabel        = false;
            scale.MinorTicksPerInterval = 4;
            scale.MajorTickSettings     = new TickSetting()
            {
                StartOffset = 0.8,
                EndOffset   = 0.72,
                Width       = 2,
                Color       = Color.DarkGray
            };
            scale.MinorTickSettings = new TickSetting()
            {
                StartOffset = 0.8,
                EndOffset   = 0.75
            };

            ObservableCollection <CircularPointer> pointers = new ObservableCollection <CircularPointer>();

            markerPointer1 = new MarkerPointer();
            markerPointer1.EnableDragging               = true;
            markerPointer1.EnableAnimation              = false;
            markerPointer1.Value                        = firstMarkerValue;
            markerPointer1.Color                        = Color.ParseColor("#F7CE72");
            markerPointer1.Offset                       = 0.9;
            markerPointer1.MarkerShape                  = Com.Syncfusion.Gauges.SfCircularGauge.Enums.MarkerShape.Circle;
            markerPointer1.ValueChanging               += MarkerPointer1_ValueChanging;
            markerPointer1.PointerPositionChangedEvent += MarkerPointer1_PointerPositionChangedEvent;
            pointers.Add(markerPointer1);

            markerPointer2 = new MarkerPointer();
            markerPointer2.EnableDragging               = true;
            markerPointer2.EnableAnimation              = false;
            markerPointer2.Value                        = secondMarkerValue;
            markerPointer2.Color                        = Color.ParseColor("#F7CE72");
            markerPointer2.Offset                       = 0.9;
            markerPointer2.MarkerShape                  = Com.Syncfusion.Gauges.SfCircularGauge.Enums.MarkerShape.Circle;
            markerPointer2.ValueChanging               += MarkerPointer2_ValueChanging;
            markerPointer2.PointerPositionChangedEvent += MarkerPointer2_PointerPositionChangedEvent;
            pointers.Add(markerPointer2);

            markerPointer2.StepFrequency = markerPointer1.StepFrequency = 0.2;

            range                  = new CircularRange();
            range.StartValue       = markerPointer1.Value;
            range.EndValue         = markerPointer2.Value;
            range.InnerStartOffset = 0.8;
            range.InnerEndOffset   = 0.8;
            range.OuterStartOffset = 0.9;
            range.OuterEndOffset   = 0.9;
            range.Color            = Color.ParseColor("#E57982");
            scale.CircularRanges.Add(range);

            scale.CircularPointers = pointers;
            circularScales.Add(scale);

            sfCircularGauge.CircularScales = circularScales;
            sfCircularGauge.SetBackgroundColor(Color.White);

            LinearLayout linearLayout = new LinearLayout(context);

            linearLayout.AddView(sfCircularGauge);
            linearLayout.SetPadding(30, 30, 30, 30);
            linearLayout.SetBackgroundColor(Color.White);
            linearLayout.LayoutChange += LinearLayout_LayoutChange;
            return(linearLayout);
        }
Esempio n. 4
0
        public override View GetSampleContent(Context con)
        {
            SfCircularGauge sfCircularGauge = new SfCircularGauge(con);

            ObservableCollection <CircularScale> circularScales = new ObservableCollection <CircularScale>();

            scale                               = new CircularScale();
            scale.StartValue                    = 0;
            scale.EndValue                      = 240;
            scale.Interval                      = 20;
            scale.StartAngle                    = 135;
            scale.SweepAngle                    = 270;
            scale.RimColor                      = Color.ParseColor("#C62E0A");
            scale.LabelColor                    = Color.ParseColor("#C62E0A");
            scale.LabelOffset                   = 0.88;
            scale.ScaleStartOffset              = 0.7;
            scale.ScaleEndOffset                = 0.69;
            scale.MinorTicksPerInterval         = 1;
            scale.MajorTickSettings.StartOffset = 0.7;
            scale.MajorTickSettings.EndOffset   = 0.77;
            scale.MajorTickSettings.Width       = 2;
            scale.MajorTickSettings.Color       = Color.ParseColor("#C62E0A");
            scale.MinorTickSettings.StartOffset = 0.7;
            scale.MinorTickSettings.EndOffset   = 0.75;
            scale.MinorTickSettings.Width       = 2;
            scale.MinorTickSettings.Color       = Color.ParseColor("#C62E0A");

            ObservableCollection <CircularPointer> pointers = new ObservableCollection <CircularPointer>();
            MarkerPointer markerPointer = new MarkerPointer();

            markerPointer.Value           = 120;
            markerPointer.Color           = Color.ParseColor("#C62E0A");
            markerPointer.Offset          = 0.69;
            markerPointer.MarkerShape     = Com.Syncfusion.Gauges.SfCircularGauge.Enums.MarkerShape.InvertedTriangle;
            markerPointer.EnableAnimation = false;
            pointers.Add(markerPointer);

            scale.CircularPointers = pointers;
            circularScales.Add(scale);

            circularScale2                               = new CircularScale();
            circularScale2.StartAngle                    = 135;
            circularScale2.SweepAngle                    = 270;
            circularScale2.StartValue                    = 0;
            circularScale2.EndValue                      = 160;
            circularScale2.Interval                      = 40;
            circularScale2.MinorTicksPerInterval         = 1;
            circularScale2.RimColor                      = Color.ParseColor("#333333");
            circularScale2.LabelOffset                   = 0.45;
            circularScale2.LabelColor                    = Color.ParseColor("#333333");
            circularScale2.ScaleStartOffset              = 0.65;
            circularScale2.ScaleEndOffset                = 0.64;
            circularScale2.MajorTickSettings.StartOffset = 0.64;
            circularScale2.MajorTickSettings.EndOffset   = 0.57;
            circularScale2.MajorTickSettings.Width       = 2;
            circularScale2.MajorTickSettings.Color       = Color.ParseColor("#333333");
            circularScale2.MinorTickSettings.StartOffset = 0.64;
            circularScale2.MinorTickSettings.EndOffset   = 0.59;
            circularScale2.MinorTickSettings.Width       = 2;
            circularScale2.MinorTickSettings.Color       = Color.ParseColor("#333333");

            ObservableCollection <CircularPointer> circularPointers = new ObservableCollection <CircularPointer>();
            MarkerPointer markerPointer1 = new MarkerPointer();

            markerPointer1.Value           = 80;
            markerPointer1.Color           = Color.ParseColor("#333333");
            markerPointer1.Offset          = 0.65;
            markerPointer1.MarkerShape     = Com.Syncfusion.Gauges.SfCircularGauge.Enums.MarkerShape.Triangle;
            markerPointer1.EnableAnimation = false;
            circularPointers.Add(markerPointer1);

            circularScale2.CircularPointers = circularPointers;
            circularScales.Add(circularScale2);

            sfCircularGauge.CircularScales = circularScales;

            sfCircularGauge.SetBackgroundColor(Color.White);

            LinearLayout linearLayout = new LinearLayout(con);

            linearLayout.AddView(sfCircularGauge);
            linearLayout.SetPadding(30, 30, 30, 30);
            linearLayout.SetBackgroundColor(Color.White);
            return(linearLayout);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SfCircularGauge circularGauge = new SfCircularGauge(this);

            circularGauge.SetBackgroundColor(Color.White);
            ObservableCollection <CircularScale> scales = new ObservableCollection <CircularScale>();



            CircularScale scale1 = new CircularScale();

            scale1.ShowTicks        = false;
            scale1.StartValue       = 0;
            scale1.EndValue         = 100;
            scale1.StartAngle       = 160;
            scale1.SweepAngle       = 220;
            scale1.ShowLabels       = false;
            scale1.RimColor         = Color.ParseColor("#f4deeb");
            scale1.ScaleStartOffset = 0.9;
            scale1.ScaleEndOffset   = 0.5;


            CircularRange range1 = new CircularRange();

            range1.StartValue       = 0;
            range1.EndValue         = 70;
            range1.OuterStartOffset = 0.9;
            range1.OuterEndOffset   = 0.9;
            range1.InnerStartOffset = 0.7;
            range1.InnerEndOffset   = 0.7;
            scale1.CircularRanges.Add(range1);

            ObservableCollection <GaugeGradientStop> gradientColor1 = new ObservableCollection <GaugeGradientStop>();

            GaugeGradientStop gaugeGradientStop = new GaugeGradientStop();

            gaugeGradientStop.Value = 0;
            gaugeGradientStop.Color = Color.WhiteSmoke;
            gradientColor1.Add(gaugeGradientStop);

            GaugeGradientStop gaugeGradientStop1 = new GaugeGradientStop();

            gaugeGradientStop1.Value = 50;
            gaugeGradientStop1.Color = Color.Olive;
            gradientColor1.Add(gaugeGradientStop1);

            CircularRange range2 = new CircularRange();

            range2.StartValue       = 0;
            range2.EndValue         = 40;
            range2.OuterStartOffset = 0.7;
            range2.OuterEndOffset   = 0.7;
            range2.InnerStartOffset = 0.5;
            range2.InnerEndOffset   = 0.5;


            ObservableCollection <GaugeGradientStop> gradientColor2 = new ObservableCollection <GaugeGradientStop>();


            GaugeGradientStop gaugeGradientStop2 = new GaugeGradientStop();

            gaugeGradientStop2.Value = 0;
            gaugeGradientStop2.Color = Color.ParseColor("#d5f7cd");
            gradientColor2.Add(gaugeGradientStop2);

            GaugeGradientStop gaugeGradientStop3 = new GaugeGradientStop();

            gaugeGradientStop3.Value = 20;
            gaugeGradientStop3.Color = Color.ParseColor("#5af736");
            gradientColor2.Add(gaugeGradientStop3);

            GaugeGradientStop gaugeGradientStop4 = new GaugeGradientStop();

            gaugeGradientStop4.Value = 35;
            gaugeGradientStop4.Color = Color.DarkGreen;
            gradientColor2.Add(gaugeGradientStop4);

            range1.GradientStops = gradientColor1;
            range2.GradientStops = gradientColor2;

            scale1.CircularRanges.Add(range1);
            scale1.CircularRanges.Add(range2);

            scales.Add(scale1);



            circularGauge.CircularScales = scales;

            SetContentView(circularGauge);
        }
Esempio n. 6
0
        public override View GetSampleContent(Context con)
        {
            SfCircularGauge sfCircularGauge = new SfCircularGauge(con);

            ObservableCollection <Header> headers = new ObservableCollection <Header>();
            Header header = new Header();

            header.Text      = "0";
            header.TextSize  = 20;
            header.TextColor = Color.ParseColor("#F03E3E");
            header.Position  = new PointF((float)0.28, (float)0.86);
            headers.Add(header);

            Header header1 = new Header();

            header1.Text      = "100";
            header1.TextSize  = 20;
            header1.TextColor = Color.ParseColor("#30B32D");
            header1.Position  = new PointF((float)0.75, (float)0.86);
            headers.Add(header1);

            Header header2 = new Header();

            header2.Text      = "55%";
            header2.TextSize  = 20;
            header2.TextColor = Color.ParseColor("#F03E3E");
            header2.Position  = new PointF((float)0.5, (float)0.5);
            headers.Add(header2);
            sfCircularGauge.Headers = headers;

            ObservableCollection <CircularScale> circularScales = new ObservableCollection <CircularScale>();
            CircularScale scale = new CircularScale();

            scale.StartValue = 0;
            scale.EndValue   = 100;
            scale.Interval   = 10;
            scale.ShowRim    = false;
            scale.ShowTicks  = false;
            scale.ShowLabels = false;

            ObservableCollection <CircularRange> ranges = new ObservableCollection <CircularRange>();
            CircularRange circularRange = new CircularRange();

            circularRange.Offset     = 0.8;
            circularRange.StartValue = 0;
            circularRange.EndValue   = 100;
            circularRange.Width      = 25;

            ObservableCollection <GaugeGradientStop> gradients = new ObservableCollection <GaugeGradientStop>();
            GaugeGradientStop gaugeGradientStop = new GaugeGradientStop();

            gaugeGradientStop.Value = 0;
            gaugeGradientStop.Color = Color.ParseColor("#F03E3E");
            gradients.Add(gaugeGradientStop);
            GaugeGradientStop gaugeGradientStop1 = new GaugeGradientStop();

            gaugeGradientStop1.Value = 35;
            gaugeGradientStop1.Color = Color.ParseColor("#FFDD00");
            gradients.Add(gaugeGradientStop1);
            GaugeGradientStop gaugeGradientStop2 = new GaugeGradientStop();

            gaugeGradientStop2.Value = 75;
            gaugeGradientStop2.Color = Color.ParseColor("#FFDD00");
            gradients.Add(gaugeGradientStop2);
            GaugeGradientStop gaugeGradientStop3 = new GaugeGradientStop();

            gaugeGradientStop3.Value = 100;
            gaugeGradientStop3.Color = Color.ParseColor("#30B32D");
            gradients.Add(gaugeGradientStop3);
            circularRange.GradientStops = gradients;
            ranges.Add(circularRange);
            scale.CircularRanges = ranges;

            ObservableCollection <CircularPointer> pointers = new ObservableCollection <CircularPointer>();
            MarkerPointer markerPointer = new MarkerPointer();

            markerPointer.MarkerShape  = Com.Syncfusion.Gauges.SfCircularGauge.Enums.MarkerShape.InvertedTriangle;
            markerPointer.Offset       = 0.8;
            markerPointer.MarkerHeight = 15;
            markerPointer.MarkerWidth  = 15;
            markerPointer.Value        = 55;
            markerPointer.Color        = Color.Red;
            pointers.Add(markerPointer);

            scale.CircularPointers = pointers;
            circularScales.Add(scale);
            sfCircularGauge.CircularScales = circularScales;

            sfCircularGauge.SetBackgroundColor(Color.White);

            LinearLayout linearLayout = new LinearLayout(con);

            linearLayout.AddView(sfCircularGauge);
            linearLayout.SetPadding(30, 30, 30, 30);
            linearLayout.SetBackgroundColor(Color.White);
            return(linearLayout);
        }
        public override View GetSampleContent(Context con)
        {
            DisplayMetrics displayMetrics = con.Resources.DisplayMetrics;
            float          screenHeight   = displayMetrics.HeightPixels;

            SfCircularGauge sfCircularGauge = new SfCircularGauge(con);

            ObservableCollection <Header> headers = new ObservableCollection <Header>();

            header           = new Header();
            header.Text      = Math.Round((double)800, 2) + " GB";
            header.TextSize  = 24;
            header.TextColor = Color.Black;
            header.Position  = new PointF((float)0.5, (float)0.1);
            headers.Add(header);
            sfCircularGauge.Headers = headers;

            ObservableCollection <CircularScale> circularScales = new ObservableCollection <CircularScale>();
            CircularScale scale = new CircularScale();

            scale.StartAngle            = 210;
            scale.SweepAngle            = 120;
            scale.StartValue            = 0;
            scale.EndValue              = 1000;
            scale.Interval              = 500;
            scale.ShowLabels            = false;
            scale.ShowTicks             = false;
            scale.ShowRim               = false;
            scale.MinorTicksPerInterval = 0;

            ObservableCollection <CircularRange> ranges = new ObservableCollection <CircularRange>();

            circularRange            = new CircularRange();
            circularRange.StartValue = 0;
            circularRange.EndValue   = 1000;
            circularRange.Color      = Color.ParseColor("#E0E0E0");
            circularRange.Offset     = 0.7;
            circularRange.Width      = 30;
            ranges.Add(circularRange);
            scale.CircularRanges = ranges;

            ObservableCollection <CircularPointer> pointers = new ObservableCollection <CircularPointer>();

            rangePointer                 = new RangePointer();
            rangePointer.Value           = 800;
            rangePointer.Color           = Color.ParseColor("#FFDD00");
            rangePointer.Width           = 30;
            rangePointer.Offset          = 0.7;
            rangePointer.EnableAnimation = false;
            pointers.Add(rangePointer);

            needlePointer                  = new NeedlePointer();
            needlePointer.Value            = 800;
            needlePointer.Color            = Color.ParseColor("#424242");
            needlePointer.Type             = Com.Syncfusion.Gauges.SfCircularGauge.Enums.NeedleType.Triangle;
            needlePointer.LengthFactor     = 0.7;
            needlePointer.Width            = 10;
            needlePointer.KnobRadiusFactor = 0.1;
            needlePointer.KnobColor        = Color.ParseColor("#424242");
            pointers.Add(needlePointer);

            scale.CircularPointers = pointers;
            circularScales.Add(scale);
            sfCircularGauge.CircularScales = circularScales;

            sfCircularGauge.SetBackgroundColor(Color.White);

            SfCircularGauge circularGauge = new SfCircularGauge(con);

            ObservableCollection <Header> headers1 = new ObservableCollection <Header>();

            header1           = new Header();
            header1.Text      = Math.Round((double)800, 2) + " GB";
            header1.TextSize  = 24;
            header1.TextColor = Color.Black;
            header1.Position  = new PointF((float)0.5, (float)0.5);
            headers1.Add(header1);

            Header header2 = new Header();

            header2.Text      = "Used";
            header2.TextSize  = 18;
            header2.TextColor = Color.Gray;
            header2.Position  = new PointF((float)0.5, (float)0.6);
            headers1.Add(header2);

            circularGauge.Headers = headers1;

            ObservableCollection <CircularScale> circularScales1 = new ObservableCollection <CircularScale>();
            CircularScale scale1 = new CircularScale();

            scale1.StartAngle            = 90;
            scale1.SweepAngle            = 360;
            scale1.StartValue            = 0;
            scale1.EndValue              = 1000;
            scale1.Interval              = 500;
            scale1.ShowLabels            = false;
            scale1.ShowTicks             = false;
            scale1.ShowRim               = false;
            scale1.MinorTicksPerInterval = 0;

            ObservableCollection <CircularRange> ranges1 = new ObservableCollection <CircularRange>();

            circularRange1            = new CircularRange();
            circularRange1.StartValue = 0;
            circularRange1.EndValue   = 999.9;
            circularRange1.Color      = Color.ParseColor("#E0E0E0");
            circularRange1.Offset     = 0.8;
            circularRange1.Width      = 30;
            ranges1.Add(circularRange1);
            scale1.CircularRanges = ranges1;

            ObservableCollection <CircularPointer> pointers1 = new ObservableCollection <CircularPointer>();

            rangePointer1                 = new RangePointer();
            rangePointer1.Value           = 800;
            rangePointer1.Color           = Color.ParseColor("#FFDD00");
            rangePointer1.Width           = 30;
            rangePointer1.Offset          = 0.8;
            rangePointer1.EnableAnimation = false;
            pointers1.Add(rangePointer1);

            scale1.CircularPointers = pointers1;

            circularScales1.Add(scale1);
            circularGauge.CircularScales = circularScales1;

            circularGauge.SetBackgroundColor(Color.White);

            LinearLayout outerLinearLayout = (LinearLayout)sfCircularGauge.FindViewById(Resource.Id.linearLayout);

            LinearLayout linearLayout = new LinearLayout(con);

            linearLayout.Orientation      = Orientation.Vertical;
            linearLayout.LayoutParameters = new LayoutParams(LayoutParams.MatchParent, LayoutParams.MatchParent);
            linearLayout.AddView(sfCircularGauge, LayoutParams.WrapContent, (int)(screenHeight / 2.7));
            linearLayout.AddView(circularGauge, LayoutParams.WrapContent, (int)(screenHeight / 2.7));
            linearLayout.SetBackgroundColor(Color.White);
            linearLayout.SetPadding(30, 30, 30, 30);
            ScrollView mainView = new ScrollView(con);

            mainView.AddView(linearLayout);


            return(mainView);
        }
        public override View GetSampleContent (Context con)
		{
            circularGauge = new SfCircularGauge(con);

            ObservableCollection<CircularScale> _circularScales = new ObservableCollection<CircularScale>();
            ObservableCollection<CircularPointer> _circularPointers = new ObservableCollection<CircularPointer>();
            ObservableCollection<Header> _gaugeHeaders = new ObservableCollection<Header>();
            // adding  new CircularScale
            circularScale = new CircularScale();
            circularScale.StartValue = 0;
            circularScale.EndValue = 100;
            circularScale.StartAngle = 130;
            circularScale.SweepAngle = 280;
            circularScale.RimWidth = 10;
            circularScale.RimColor = Color.ParseColor("#D14646");
            circularScale.MinorTicksPerInterval = 0;
            circularScale.LabelOffset = labelsOffset;
            circularScale.LabelTextSize = 18;

            //adding major ticks
            majorTickstings = new TickSetting();
            majorTickstings.Color = Color.ParseColor("#444444");
            majorTickstings.Size = 15;
            majorTickstings.Offset = ticksOffset;
            circularScale.MajorTickSettings = majorTickstings;

            //adding minor ticks
            TickSetting minorTickstings = new TickSetting();
            minorTickstings.Color = Color.Gray;
            circularScale.MinorTickSettings = minorTickstings;

            // adding needle Pointer
            needlePointer = new NeedlePointer();
            needlePointer.Value = pointerValue;
            needlePointer.KnobColor = Color.ParseColor("#2BBFB8");
            needlePointer.KnobRadius = 20;
            needlePointer.Type = NeedleType.Bar;
            needlePointer.LengthFactor = 0.8;
            needlePointer.Width = 3;
            needlePointer.Color = Color.Gray;
            _circularPointers.Add(needlePointer);

            // adding range Pointer
            rangePointer = new RangePointer();
            rangePointer.Value = pointerValue;
            rangePointer.Color = Color.ParseColor("#2BBFB8");
            rangePointer.Width = 10;
            _circularPointers.Add(rangePointer);

            circularScale.CircularPointers = _circularPointers;
            _circularScales.Add(circularScale);

            //adding header
            Header circularGaugeHeader = new Header();
            circularGaugeHeader.Text = "Speedometer";
            circularGaugeHeader.TextColor = Color.Gray;
            circularGaugeHeader.Position = new PointF((float)0.38, (float)0.7);
            circularGaugeHeader.TextSize = 20;
            _gaugeHeaders.Add(circularGaugeHeader);
            circularGauge.Headers = _gaugeHeaders;
            circularGauge.CircularScales = _circularScales;
            circularGauge.SetBackgroundColor(Color.White);

            LinearLayout linearLayout = new LinearLayout(con);
            linearLayout.AddView(circularGauge);
            linearLayout.SetPadding(30, 30, 30, 30);
            linearLayout.SetBackgroundColor(Color.White);
            return linearLayout;
		}
        public override View GetSampleContent(Context con)
        {
            SfCircularGauge sfCircularGauge = new SfCircularGauge(con);

            ObservableCollection <CircularScale> circularScales = new ObservableCollection <CircularScale>();
            CircularScale scale = new CircularScale();

            scale.StartAngle                    = 270;
            scale.StartValue                    = 0;
            scale.EndValue                      = 16;
            scale.Interval                      = 2;
            scale.LabelOffset                   = 0.75;
            scale.SweepAngle                    = 360;
            scale.MinorTicksPerInterval         = 1;
            scale.ShowLastLabel                 = false;
            scale.ScaleStartOffset              = 0.99;
            scale.ScaleEndOffset                = 0.9;
            scale.LabelCreated                 += Scale_LabelCreated;
            scale.RimColor                      = Color.ParseColor("#E0E0E0");
            scale.LabelColor                    = Color.ParseColor("#4B4B4B");
            scale.MajorTickSettings.StartOffset = 0.9;
            scale.MajorTickSettings.EndOffset   = 0.83;
            scale.MajorTickSettings.Width       = 2;
            scale.MajorTickSettings.Color       = Color.ParseColor("#9E9E9E");
            scale.MinorTickSettings.StartOffset = 0.9;
            scale.MinorTickSettings.EndOffset   = 0.85;
            scale.MinorTickSettings.Width       = 2;
            scale.MinorTickSettings.Color       = Color.ParseColor("#9E9E9E");

            ObservableCollection <CircularPointer> pointers = new ObservableCollection <CircularPointer>();

            pointer                  = new NeedlePointer();
            pointer.Value            = 14;
            pointer.Color            = Color.ParseColor("#f03e3e");
            pointer.Type             = Com.Syncfusion.Gauges.SfCircularGauge.Enums.NeedleType.Triangle;
            pointer.LengthFactor     = 0.65;
            pointer.Width            = 20;
            pointer.KnobRadiusFactor = 0;
            pointer.KnobColor        = Color.White;
            pointer.KnobStrokeWidth  = 3;
            pointer.KnobStrokeColor  = Color.White;
            pointer.EnableAnimation  = false;
            pointers.Add(pointer);

            NeedlePointer needlePointer = new NeedlePointer();

            needlePointer.Value            = 6;
            needlePointer.Type             = Com.Syncfusion.Gauges.SfCircularGauge.Enums.NeedleType.Triangle;
            needlePointer.LengthFactor     = 0.65;
            needlePointer.Width            = 20;
            needlePointer.Color            = Color.ParseColor("#9E9E9E");
            needlePointer.KnobRadiusFactor = 0.11;
            needlePointer.KnobColor        = Color.White;
            needlePointer.KnobStrokeWidth  = 3;
            needlePointer.KnobStrokeColor  = Color.White;
            needlePointer.EnableAnimation  = false;
            pointers.Add(needlePointer);

            scale.CircularPointers = pointers;
            circularScales.Add(scale);
            sfCircularGauge.CircularScales = circularScales;

            sfCircularGauge.SetBackgroundColor(Color.White);

            LinearLayout linearLayout = new LinearLayout(con);

            linearLayout.AddView(sfCircularGauge);
            linearLayout.SetPadding(30, 30, 30, 30);
            linearLayout.SetBackgroundColor(Color.White);
            return(linearLayout);
        }
        public override View GetSampleContent(Context con)
        {
            circularGauge = new SfCircularGauge(con);

            ObservableCollection <CircularScale>   _circularScales   = new ObservableCollection <CircularScale>();
            ObservableCollection <CircularPointer> _circularPointers = new ObservableCollection <CircularPointer>();
            ObservableCollection <Header>          _gaugeHeaders     = new ObservableCollection <Header>();

            // adding  new CircularScale
            circularScale                       = new CircularScale();
            circularScale.StartValue            = 0;
            circularScale.EndValue              = 100;
            circularScale.StartAngle            = 130;
            circularScale.SweepAngle            = 280;
            circularScale.RimWidth              = 10;
            circularScale.RimColor              = Color.ParseColor("#D14646");
            circularScale.MinorTicksPerInterval = 0;
            circularScale.LabelOffset           = labelsOffset;
            circularScale.LabelTextSize         = 18;

            //adding major ticks
            majorTickstings                 = new TickSetting();
            majorTickstings.Color           = Color.ParseColor("#444444");
            majorTickstings.Size            = 15;
            majorTickstings.Offset          = ticksOffset;
            circularScale.MajorTickSettings = majorTickstings;

            //adding minor ticks
            TickSetting minorTickstings = new TickSetting();

            minorTickstings.Color           = Color.Gray;
            circularScale.MinorTickSettings = minorTickstings;

            // adding needle Pointer
            needlePointer              = new NeedlePointer();
            needlePointer.Value        = pointerValue;
            needlePointer.KnobColor    = Color.ParseColor("#2BBFB8");
            needlePointer.KnobRadius   = 20;
            needlePointer.Type         = NeedleType.Bar;
            needlePointer.LengthFactor = 0.8;
            needlePointer.Width        = 3;
            needlePointer.Color        = Color.Gray;
            _circularPointers.Add(needlePointer);

            // adding range Pointer
            rangePointer       = new RangePointer();
            rangePointer.Value = pointerValue;
            rangePointer.Color = Color.ParseColor("#2BBFB8");
            rangePointer.Width = 10;
            _circularPointers.Add(rangePointer);

            circularScale.CircularPointers = _circularPointers;
            _circularScales.Add(circularScale);

            //adding header
            Header circularGaugeHeader = new Header();

            circularGaugeHeader.Text      = "Speedometer";
            circularGaugeHeader.TextColor = Color.Gray;
            circularGaugeHeader.Position  = new PointF((float)0.38, (float)0.7);
            circularGaugeHeader.TextSize  = 20;
            _gaugeHeaders.Add(circularGaugeHeader);
            circularGauge.Headers        = _gaugeHeaders;
            circularGauge.CircularScales = _circularScales;
            circularGauge.SetBackgroundColor(Color.White);

            LinearLayout linearLayout = new LinearLayout(con);

            linearLayout.AddView(circularGauge);
            linearLayout.SetPadding(30, 30, 30, 30);
            linearLayout.SetBackgroundColor(Color.White);
            return(linearLayout);
        }