menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class LinearRange - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class LinearRange

    Represents the linear range. To render this range, create an instance of LinearRange class and set required properties.

    Inheritance
    System.Object
    LinearRange
    Namespace: Syncfusion.SfGauge.XForms
    Assembly: Syncfusion.SfGauge.XForms.dll
    Syntax
    public class LinearRange : Element, IThemeElement

    Constructors

    LinearRange()

    Initializes a new instance of the LinearRange class.

    Declaration
    public LinearRange()

    Fields

    ColorProperty

    Gets or sets the Color of the linear range. Used to customize the color of an range for linear gauge. This is a bindable property.

    Declaration
    public static readonly BindableProperty ColorProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EndValueProperty

    Gets or sets the EndValue of the linear range. Used to specify the end value of an linear range. This is a bindable property.

    Declaration
    public static readonly BindableProperty EndValueProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    EndWidthProperty

    Gets or sets the EndWidth of the linear range. Used to customize the end width of an linear range. This is a bindable property.

    Declaration
    public static readonly BindableProperty EndWidthProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    GradientStopsProperty

    Gets or sets the collection of GradientColor in linear range. Used to customize the gradient stop color for linear range. This is a bindable property.

    Declaration
    public static readonly BindableProperty GradientStopsProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    OffsetProperty

    Gets or sets the Offset property of the linear range. Used to customize the position of an linear range. This is a bindable property.

    Declaration
    public static readonly BindableProperty OffsetProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    StartValueProperty

    Gets or sets the StartValue of the linear range. Used to specify the start value of an linear range. This is a bindable property.

    Declaration
    public static readonly BindableProperty StartValueProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    StartWidthProperty

    Gets or sets the StartWidth of the linear range. Used to customize the start width of an linear range. This is a bindable property.

    Declaration
    public static readonly BindableProperty StartWidthProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    Properties

    Color

    Gets or sets the Color of the linear range. Used to customize the color of an range for linear gauge.

    Declaration
    public Color Color { get; set; }
    Property Value
    Type Description
    Xamarin.Forms.Color

    This property takes the Color as value.

    Examples

    This sample shows how to set the Color for the gauge.

    void MyPage()
    {
    	SfLinearGauge gauge = new SfLinearGauge();
    	LinearScale scale = new LinearScale();
    	LinearRange range = new LinearRange();
    	range.Color = Color.Red;
    	scale.Ranges.Add(range);
    	gauge.Scales.Add(scale);
    }

    EndValue

    Gets or sets the EndValue of the linear range. Used to specify the end value of an linear range.

    Declaration
    public double EndValue { get; set; }
    Property Value
    Type Description
    System.Double

    This property takes the System.Double as value.

    Examples

    This sample shows how to set the EndValue for the gauge.

    void MyPage()
    {
    	SfLinearGauge gauge = new SfLinearGauge();
    	LinearScale scale = new LinearScale();
    	LinearRange range = new LinearRange();
    	range.EndValue = 100;
    	scale.Ranges.Add(range);
    	gauge.Scales.Add(scale);
    }

    EndWidth

    Gets or sets the EndWidth of the linear range. Used to customize the end width of an linear range.

    Declaration
    public double EndWidth { get; set; }
    Property Value
    Type Description
    System.Double

    This property takes the System.Double as value.

    Examples

    This sample shows how to set the EndWidth for the gauge.

    void MyPage()
    {
    	SfLinearGauge gauge = new SfLinearGauge();
    	LinearScale scale = new LinearScale();
    	LinearRange range = new LinearRange();
    	range.EndWidth = 20;
    	scale.Ranges.Add(range);
    	gauge.Scales.Add(scale);
    }

    GradientStops

    Gets or sets the collection of GradientColor in linear range. Used to customize the gradient stop color for linear range. This is a bindable property.

    Declaration
    public ObservableCollection<GaugeGradientStop> GradientStops { get; set; }
    Property Value
    Type
    System.Collections.ObjectModel.ObservableCollection<GaugeGradientStop>

    Offset

    Gets or sets the Offset of the linear range. Used to customize the position of an linear range. This is a bindable property.

    Declaration
    public double Offset { get; set; }
    Property Value
    Type Description
    System.Double

    This property takes the System.Double as value.

    Examples

    This sample shows how to set the Offset for the gauge.

    void MyPage()
    {
    	SfLinearGauge gauge = new SfLinearGauge();
    	LinearScale scale = new LinearScale();
    	LinearRange range = new LinearRange();
    	range.Offset = 0.2;
    	scale.Ranges.Add(range);
    	gauge.Scales.Add(scale);
    }

    StartValue

    Gets or sets the StartValue of the linear range. Used to specify the start value of an linear range.

    Declaration
    public double StartValue { get; set; }
    Property Value
    Type Description
    System.Double

    This property takes the System.Double as value.

    Examples

    This sample shows how to set the StartValue for the gauge.

    void MyPage()
    {
    	SfLinearGauge gauge = new SfLinearGauge();
    	LinearScale scale = new LinearScale();
    	LinearRange range = new LinearRange();
    	range.StartValue = 10;
    	scale.Ranges.Add(range);
    	gauge.Scales.Add(scale);
    }

    StartWidth

    Gets or sets the StartWidth of the linear range. Used to customize the start width of an linear range.

    Declaration
    public double StartWidth { get; set; }
    Property Value
    Type Description
    System.Double

    This property takes the System.Double as value.

    Examples

    This sample shows how to set the StartWidth for the gauge.

    void MyPage()
    {
    	SfLinearGauge gauge = new SfLinearGauge();
    	LinearScale scale = new LinearScale();
    	LinearRange range = new LinearRange();
    	range.StartWidth = 10;
    	scale.Ranges.Add(range);
    	gauge.Scales.Add(scale);
    }

    Methods

    OnBindingContextChanged()

    Method ise used to set binding context.

    Declaration
    protected override void OnBindingContextChanged()
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved