menu

Xamarin.Forms

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

    Show / Hide Table of Contents

    Class NeedlePointer

    Represents the needle pointer. To render this pointer, create an instance of NeedlePointer class, and set required properties.

    Inheritance
    System.Object
    Pointer
    NeedlePointer
    Inherited Members
    Pointer.AnimationDuration
    Pointer.AnimationDurationProperty
    Pointer.Color
    Pointer.ColorProperty
    Pointer.EnableAnimation
    Pointer.EnableAnimationProperty
    Pointer.Value
    Pointer.ValueChangeCompleted
    Pointer.ValueChanged
    Pointer.ValueChangeStarted
    Pointer.ValueChanging
    Pointer.ValueProperty
    Namespace: Syncfusion.SfGauge.XForms
    Assembly: Syncfusion.SfGauge.XForms.dll
    Syntax
    public class NeedlePointer : Pointer, IThemeElement

    Constructors

    NeedlePointer()

    Initializes a new instance of the NeedlePointer class. You can customize the needle pointer using this instance.

    Declaration
    public NeedlePointer()

    Fields

    EnableDraggingProperty

    Gets or sets a value that indicates whether the PointerDragging property to be enabled for needle pointer. This is a bindable property.

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

    KnobColorProperty

    Gets or sets the knob color of the needle pointer. It customizes the knob color of the needle pointer. This is a bindable property.

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

    KnobRadiusFactorProperty

    Gets or sets the knob radius factor of the needle pointer. It customizes the knob radius factor of needle pointer.

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

    KnobRadiusProperty

    Gets or sets the knob radius property of the needle pointer. It customizes the radius of needle pointer. This is a bindable property.

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

    KnobStrokeColorProperty

    Gets or sets the knob stroke color of the needle pointer. It customizes the stroke color of the knob.

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

    KnobStrokeWidthProperty

    Gets or sets the knob stroke width factor of the needle pointer. It customizes the stroke width of the knob.

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

    LengthFactorProperty

    Gets or sets the length factor of the needle pointer. It customizes the length factor of needle pointer.

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

    StepFrequencyProperty

    Gets or sets the step frequency of needle pointer. It is used to snap the values while dragging the pointer.

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

    TailColorProperty

    Gets or sets the tail color of the needle pointer. It customizes the color of the tail for needle pointer.

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

    TailLengthFactorProperty

    Gets or sets the tail length factor property of the needle pointer. It customizes the length factor of the tail for needle pointer.

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

    TailStrokeColorProperty

    Gets or sets the tail stroke color property of the needle pointer. It customizes the stroke color of the tail.

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

    TailStrokeWidthProperty

    Gets or sets the tail stroke width property factor of the needle pointer. It customizes the stroke width of the tail.

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

    ThicknessProperty

    Gets or sets the thickness property of the pointer. It customizes the thickness of pointer. This is a bindable property.

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

    TypeProperty

    Gets or sets the pointer type of the needle pointer. It is used to customize the pointer type for needle pointer.

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

    Properties

    EnableDragging

    Gets or sets a value that indicates whether the PointerDragging to be enabled for needle pointer. This is a bindable property.

    Declaration
    public bool EnableDragging { get; set; }
    Property Value
    Type
    System.Boolean

    KnobColor

    Gets or sets the knob color of the needle pointer. It customizes the knob color of the needle pointer.

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

    This property takes the Xamarin.Forms.Color value.

    Examples

    This sample shows how to set the KnobColor of the needle pointer.

    void MyPage()
    {
    	SfCircularGauge gauge = new SfCircularGauge();
    	Scale scale = new Scale();
    	NeedlePointer needlepointer = new NeedlePointer();
    	needlepointer.KnobColor = Color.Red;
    	scale.Pointers.Add(needlepointer);
    	gauge.Scales.Add(scale);
    }

    KnobRadius

    Gets or sets the knob radius of the needle pointer. It customizes the radius of needle pointer. This is a bindable property.

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

    This property takes the System.Double value.

    Examples

    This sample shows how to set the KnobRadius of the needle pointer.

    void MyPage()
    {
    	SfCircularGauge gauge = new SfCircularGauge();
    	Scale scale = new Scale();
    	NeedlePointer needlepointer = new NeedlePointer();
    	needlepointer.KnobRadius = 10;
    	scale.Pointers.Add(needlepointer);
    	gauge.Scales.Add(scale);
    }

    KnobRadiusFactor

    Gets or sets the knob radius factor of the needle pointer. It customizes the knob radius factor of needle pointer. This is a bindable property.

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

    This property takes the System.Double value.

    Examples

    This sample shows how to set the KnobRadiusFactor of the needle pointer.

    void MyPage()
    {
    	SfCircularGauge gauge = new SfCircularGauge();
    	Scale scale = new Scale();
    	NeedlePointer needlepointer = new NeedlePointer();
    	needlepointer.KnobRadiusFactor = 0.1;
    	scale.Pointers.Add(needlepointer);
    	gauge.Scales.Add(scale);
    }

    KnobStrokeColor

    Gets or sets the knob stroke color of the needle pointer. It customizes the stroke color of the knob. This is a bindable property.

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

    This property takes the Xamarin.Forms.Color value.

    Examples

    This sample shows how to set the KnobStrokeColor of the needle pointer.

    void MyPage()
    {
    	SfCircularGauge gauge = new SfCircularGauge();
    	Scale scale = new Scale();
    	NeedlePointer needlepointer = new NeedlePointer();
    	needlepointer.KnobStrokeColor = Color.Red;
    	scale.Pointers.Add(needlepointer);
    	gauge.Scales.Add(scale);
    }

    KnobStrokeWidth

    Gets or sets the knob stroke width factor of the needle pointer. It customizes the stroke width of the knob. This is a bindable property.

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

    This property takes the System.Double value.

    Examples

    This sample shows how to set the KnobStrokeWidth of the needle pointer.

    void MyPage()
    {
    	SfCircularGauge gauge = new SfCircularGauge();
    	Scale scale = new Scale();
    	NeedlePointer needlepointer = new NeedlePointer();
    	needlepointer.KnobStrokeWidth = 2;
    	scale.Pointers.Add(needlepointer);
    	gauge.Scales.Add(scale);
    }

    LengthFactor

    Gets or sets the length factor of the needle pointer. It customizes the length factor of needle pointer. This is a bindable property.

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

    This property takes the System.Double value.

    Examples

    This sample shows how to set the LengthFactor of the needle pointer.

    void MyPage()
    {
    	SfCircularGauge gauge = new SfCircularGauge();
    	Scale scale = new Scale();
    	NeedlePointer needlepointer = new NeedlePointer();
    	needlepointer.LengthFactor = 0.8;
    	scale.Pointers.Add(needlepointer);
    	gauge.Scales.Add(scale);
    }

    StepFrequency

    Gets or sets the snap value to the needle pointer. While dragging the pointer, it will move to next value based on step frequency value. Default value is 0.

    Declaration
    public double StepFrequency { get; set; }
    Property Value
    Type
    System.Double
    Remarks

    To drag with step frequency value, enable dragging support for pointer.

    TailColor

    Gets or sets the tail color of the needle pointer. It customizes the color of the tail. This is a bindable property.

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

    This property takes the Xamarin.Forms.Color value.

    Examples

    This sample shows how to set the TailColor of the needle pointer.

    void MyPage()
    {
    	SfCircularGauge gauge = new SfCircularGauge();
    	Scale scale = new Scale();
    	NeedlePointer needlepointer = new NeedlePointer();
    	needlepointer.TailColor = Color.Red;
    	scale.Pointers.Add(needlepointer);
    	gauge.Scales.Add(scale);
    }

    TailLengthFactor

    Gets or sets the tail length factor of the needle pointer. It customizes the length factor of the tail for needle pointer.

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

    This property takes the System.Double value.

    Examples

    This sample shows how to set the TailLengthFactor of the needle pointer.

    void MyPage()
    {
    	SfCircularGauge gauge = new SfCircularGauge();
    	Scale scale = new Scale();
    	NeedlePointer needlepointer = new NeedlePointer();
    	needlepointer.TailLengthFactor = 0.2;
    	scale.Pointers.Add(needlepointer);
    	gauge.Scales.Add(scale);
    }

    TailStrokeColor

    Gets or sets the tail stroke color of the needle pointer. It customizes the stroke color of the tail.

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

    This property takes the Xamarin.Forms.Color value.

    Examples

    This sample shows how to set the TailStrokeColor of the needle pointer.

    void MyPage()
    {
    	SfCircularGauge gauge = new SfCircularGauge();
    	Scale scale = new Scale();
    	NeedlePointer needlepointer = new NeedlePointer();
    	needlepointer.TailStrokeColor = Color.Red;
    	scale.Pointers.Add(needlepointer);
    	gauge.Scales.Add(scale);
    }

    TailStrokeWidth

    Gets or sets the tail stroke width factor of the needle pointer. It customizes the stroke width of the tail.

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

    This property takes the System.Double value.

    Examples

    This sample shows how to set the TailStrokeWidth of the needle pointer.

    void MyPage()
    {
    	SfCircularGauge gauge = new SfCircularGauge();
    	Scale scale = new Scale();
    	NeedlePointer needlepointer = new NeedlePointer();
    	needlepointer.TailStrokeWidth = 2;
    	scale.Pointers.Add(needlepointer);
    	gauge.Scales.Add(scale);
    }

    Thickness

    Gets or sets the thickness of the pointer. It customizes the thickness of pointer. This is a bindable property.

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

    This property takes the System.Double value.

    Examples

    This sample shows how to set the Offset of the pointer.

    void MyPage()
    {
    	SfCircularGauge gauge = new SfCircularGauge();
    	Scale scale = new Scale();
    	RangePointer rangePointer = new RangePointer();
    	rangePointer.Thickness = 10;
    	scale.Pointers.Add(rangePointer);
    	gauge.Scales.Add(scale);
    }

    Type

    Gets or sets the pointer type of the needle pointer. It customizes the pointer type for needle pointer. This is a bindable property.

    Declaration
    public PointerType Type { get; set; }
    Property Value
    Type Description
    PointerType

    This property takes the PointerType value.

    Examples

    This sample shows how to set the PointerType of the needle pointer.

    void MyPage()
    {
    	SfCircularGauge gauge = new SfCircularGauge();
    	Scale scale = new Scale();
    	NeedlePointer needlepointer = new NeedlePointer();
    	needlepointer.PointerType = Pointer.Bar;
    	scale.Pointers.Add(needlepointer);
    	gauge.Scales.Add(scale);
    }
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved