Class SfLinearGauge
Represents a root class for linear gauge; it is used to add a collection of scales. To render this gauge, create an instance of LinearGauge class.
Inheritance
Namespace: Syncfusion.SfGauge.XForms
Assembly: Syncfusion.SfGauge.XForms.dll
Syntax
public class SfLinearGauge : View, IParentThemeElement, IThemeElement
Constructors
SfLinearGauge()
Initializes a new instance of the SfLinearGauge class.
Declaration
public SfLinearGauge()
Fields
AnnotationsProperty
Gets or sets the annotations for linear gauge. It marks the specific area of interest in the gauge. This is a bindable property.
Declaration
public static readonly BindableProperty AnnotationsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
FrameProperty
Gets or sets the frame property of linear gauge. It customizes the frame of a linear gauge. This is a bindable property.
Declaration
public static readonly BindableProperty FrameProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
HeaderProperty
Gets or sets the headers property of the linear gauge. It is used to add a title to linear gauge. This is a bindable property.
Declaration
public static readonly BindableProperty HeaderProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
OrientationProperty
Gets or sets the Orientation property of linear gauge. It changes the orientaion to either horizontal or vertical. This is a bindable property.
Declaration
public static readonly BindableProperty OrientationProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ScalesProperty
Gets or sets the scales property of the linear gauge. It maintains a collection of scales in the linear gauge.
Declaration
public static readonly BindableProperty ScalesProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
Annotations
Gets or sets the annotations for linear gauge. It is used to mark the specific area of interest in the gauge.
Declaration
public LinearGaugeAnnotationCollection Annotations { get; set; }
Property Value
Type | Description |
---|---|
LinearGaugeAnnotationCollection | This property takes the LinearGaugeAnnotationCollection as value. |
Frame
Gets or sets the frame of linear gauge. It customizes the frame of a linear gauge. This is a bindable property.
Declaration
public Rectangle Frame { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Rectangle | This property takes the Xamarin.Forms.Rectangle as value. |
Examples
This sample shows how to set the Frame for the gauge.
void MyPage()
{
SfLinearGauge gauge = new SfLinearGauge();
gauge.Frame = new Rectangle();
}
Header
Gets or sets the headers property of the linear gauge. It is used to add a title to linear gauge. This is a bindable property.
Declaration
public LinearHeader Header { get; set; }
Property Value
Type |
---|
LinearHeader |
Orientation
Gets or sets the Orientation property of linear gauge. It changes the orientaion to either horizontal or vertical.
Declaration
public Orientation Orientation { get; set; }
Property Value
Type | Description |
---|---|
Orientation | This property takes the Orientation as value. |
Examples
This sample shows how to set the Orientation for the gauge.
void MyPage()
{
SfLinearGauge gauge = new SfLinearGauge();
gauge.Orientation = Orientation.OrientationHorizontal;
}
Scales
Gets or sets the scales property of linear gauge. It maintains a collection of scales in linear gauge. This is a bindable property.
Declaration
public ObservableCollection<LinearScale> Scales { get; set; }
Property Value
Type |
---|
System.Collections.ObjectModel.ObservableCollection<LinearScale> |
Methods
OnBindingContextChanged()
Method used to set binding context.
Declaration
protected override void OnBindingContextChanged()
OnSizeRequest(Double, Double)
Method used to get size fo linear 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 | Size Request. |