Class Pointer
Represents the pointer. To render this pointer, create an instance of this class Pointerand set required properties.
Namespace: Syncfusion.SfGauge.XForms
Assembly: Syncfusion.SfGauge.XForms.dll
Syntax
public class Pointer : Element, IThemeElement
Constructors
Pointer()
Initializes a new instance of the Pointer class. using this instance, you can customize the pointers for linear scale.
Declaration
public Pointer()
Fields
AnimationDurationProperty
Gets or sets the animation duration of the pointer. It customizes the animation duration of an pointer. This is a bindable property.
Declaration
public static readonly BindableProperty AnimationDurationProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ColorProperty
Gets or sets the color property of the pointer. It customizes the color of an pointer. This is a bindable property.
Declaration
public static readonly BindableProperty ColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
EnableAnimationProperty
Gets or sets a value that indicates whether the pointer to be drawn with animation of the pointer. This is a bindable property.
Declaration
public static readonly BindableProperty EnableAnimationProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ValueProperty
Gets or sets the value property of the pointer. It customizes the value for pointer. This is a bindable property.
Declaration
public static readonly BindableProperty ValueProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
AnimationDuration
Gets or sets the animation duration of the pointer. It customizes the animation duration of an pointer.
Declaration
public double AnimationDuration { get; set; }
Property Value
Type | Description |
---|---|
System.Double | This property takes the System.Double value. |
Examples
This sample shows how to set the animation duration of the pointer.
void MyPage()
{
SfCircularGauge gauge = new SfCircularGauge();
Scale scale = new Scale();
RangePointer rangePointer = new RangePointer();
rangePointer.AnimationDuration = 1.5;
scale.Pointers.Add(rangePointer);
gauge.Scales.Add(scale);
}
Color
Gets or sets the color of the pointer. It customizes the color of the pointer. This is a bindable property.
Declaration
public Color Color { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Color | This property takes the Color value. |
Examples
This sample shows how to set the Color of the pointer.
void MyPage()
{
SfCircularGauge gauge = new SfCircularGauge();
Scale scale = new Scale();
RangePointer rangePointer = new RangePointer();
rangePointer.Color = Color.Red;
scale.Pointers.Add(rangePointer);
gauge.Scales.Add(scale);
}
EnableAnimation
Gets or sets a value that indicates whether the pointer has to be drawn with animation of the pointer.
Declaration
public bool EnableAnimation { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | This property takes the System.Boolean 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.EnableAnimation = true;
scale.Pointers.Add(rangePointer);
gauge.Scales.Add(scale);
}
Value
Gets or sets the value of the pointer. It customizes the value for pointer. This is a bindable property.
Declaration
public double Value { get; set; }
Property Value
Type | Description |
---|---|
System.Double | This property takes the System.Double value. |
Examples
This sample shows how to set the Value of the pointer.
void MyPage()
{
SfCircularGauge gauge = new SfCircularGauge();
Scale scale = new Scale();
RangePointer pointer = new RangePointer();
pointer.Value = 10;
scale.Pointers.Add(pointer);
gauge.Scales.Add(scale);
}
Events
ValueChangeCompleted
Called when the user is done selecting a new value of the pointer by dragging.
Declaration
public event EventHandler<PointerValueChangedEventArgs> ValueChangeCompleted
Event Type
Type |
---|
System.EventHandler<PointerValueChangedEventArgs> |
Remarks
This event shouldn't be used to update the pointer value (use PointerPositionChanged event for that), but rather to know when the user has completed selecting a new value by ending a drag.
ValueChanged
Called when the user is selecting a new value for the pointer by dragging.
Declaration
public event EventHandler<PointerValueChangedEventArgs> ValueChanged
Event Type
Type |
---|
System.EventHandler<PointerValueChangedEventArgs> |
Remarks
This event is used to show the updated value of the pointer.
ValueChangeStarted
Called when the user starts selecting a new value of pointer by dragging.
Declaration
public event EventHandler<PointerValueChangedEventArgs> ValueChangeStarted
Event Type
Type |
---|
System.EventHandler<PointerValueChangedEventArgs> |
Remarks
This event shouldn't be used to update the pointer value (use PointerPositionChanged event for that), but rather to be notified when the user has started selecting a new value by starting a drag. The value passed will be the last value that the pointer had before the change began.
ValueChanging
Called during a drag when the user is selecting before a new value for the pointer by dragging.
Declaration
public event EventHandler<PointerValueChangingEventArgs> ValueChanging
Event Type
Type |
---|
System.EventHandler<PointerValueChangingEventArgs> |
Remarks
This event shouldn't be used to update the pointer value (use PointerPositionChanged event for that), but rather it will show the oldvalue and newvalue of the pointer.