Class SfCircularGauge
Represents a root class for the circular gauge control; this class is used to add a collection of scales.
Inheritance
Namespace: Syncfusion.SfGauge.XForms
Assembly: Syncfusion.SfGauge.XForms.dll
Syntax
public class SfCircularGauge : View, IParentThemeElement, IThemeElement
Constructors
SfCircularGauge()
Initializes a new instance of the SfCircularGauge class to customize the circular gauge with required properties.
Declaration
public SfCircularGauge()
Fields
AnnotationsProperty
Gets or sets the annotations for the circular gauge property. It marks specific area in the circular gauge. This is a bindable property.
Declaration
public static readonly BindableProperty AnnotationsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
CircularCoefficientProperty
Gets or sets the CircularCoefficient of the circular gauge property. It customizes the circular coefficient for gauge. This is a bindable property.
Declaration
public static readonly BindableProperty CircularCoefficientProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
GaugeHeadersProperty
Gets or sets the headers property of the circular gauge. It adds a collection of headers to the circular gauge.
Declaration
public static readonly BindableProperty GaugeHeadersProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
GaugeTypeProperty
Gets or sets the gauge type of the circular gauge. You can set different type of gauges to the circular gauge. This is bindable property.
Declaration
public static readonly BindableProperty GaugeTypeProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
IsCenterAlignedProperty
Gets or sets a value that indicates whether the circular gauge position is center. This is a bindable property.
Declaration
public static readonly BindableProperty IsCenterAlignedProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ScalesProperty
Gets or sets the scales of the circular gauge property. It adda multiple scale to the circular gauge. This is a bindable property.
Declaration
public static readonly BindableProperty ScalesProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
Annotations
Gets or sets the annotations for the circular gauge. It marks the specific area in the circular gauge. This is a bindable property.
Declaration
public CircularGaugeAnnotationCollection Annotations { get; set; }
Property Value
Type | Description |
---|---|
CircularGaugeAnnotationCollection | This property takes the CircularGaugeAnnotationCollection as value. |
CircularCoefficient
Gets or sets the CircularCoefficient of the circular gauge. It customizes the circular coefficient for gauge. This is a bindable property.
Declaration
public float CircularCoefficient { get; set; }
Property Value
Type |
---|
System.Single |
GaugeType
Gets or sets the gauge type of the circular gauge. You can set different types of gauges to the circular gauge.
Declaration
public GaugeType GaugeType { get; set; }
Property Value
Type | Description |
---|---|
GaugeType | This property takes the GaugeType as value. |
Examples
This sample shows how to set the GaugeType for the gauge.
void MyPage()
{
SfCircularGauge gauge = new SfCircularGauge();
gauge.GaugeType = GaugeType.Default;
}
Headers
Gets or sets the headers of the circular gauge. It adda a collection of headers to the circular gauge. This is a bindable property.
Declaration
public ObservableCollection<Header> Headers { get; set; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<Header> |
IsCenterAligned
Gets or sets a value indicating whether this SfCircularGauge is center placed.
Declaration
public bool IsCenterAligned { get; set; }
Property Value
Type |
---|
System.Boolean |
Scales
Gets or sets the scales of the circular gauge. It adda multiple scales to the circular gauge. This is a bindable property.
Declaration
public ObservableCollection<Scale> Scales { get; set; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<Scale> |
Methods
add_PointerPositionChanged(SfCircularGauge.CircularPointerEventHandler)
Declaration
public void add_PointerPositionChanged(SfCircularGauge.CircularPointerEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfCircularGauge.CircularPointerEventHandler | value |
GetStream()
This method returns the stream of circular gauge output.
Declaration
public Task<Stream> GetStream()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.IO.Stream> | It will return the circular gauge as Stream asynchronously. |
OnBindingContextChanged()
Method used to set binding context.
Declaration
protected override void OnBindingContextChanged()
OnSizeRequest(Double, Double)
Method used to get size for circular gauge.
Declaration
protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint)
Parameters
Type | Name | Description |
---|---|---|
System.Double | widthConstraint | Width constraint. |
System.Double | heightConstraint | Height constraint. |
Returns
Type | Description |
---|---|
Xamarin.Forms.SizeRequest | SizeRequest. |
remove_PointerPositionChanged(SfCircularGauge.CircularPointerEventHandler)
Declaration
public void remove_PointerPositionChanged(SfCircularGauge.CircularPointerEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfCircularGauge.CircularPointerEventHandler | value |
SaveAsImage(String)
This method is used to export the gauge as image in the given file name and image format.
Declaration
public void SaveAsImage(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | It contains the file name of the exported image. |
Events
PointerPositionChanged
PointerPositionChanged event is raised on change of the pointer position.
Declaration
public event SfCircularGauge.CircularPointerEventHandler PointerPositionChanged
Event Type
Type |
---|
SfCircularGauge.CircularPointerEventHandler |