Class LinearTickSettings
Represents the linear tick settings. To render this scale, create an instance of LinearTickSettings class, and set required properties.
Inheritance
Namespace: Syncfusion.SfGauge.XForms
Assembly: Syncfusion.SfGauge.XForms.dll
Syntax
public class LinearTickSettings : Element, IThemeElement
Constructors
LinearTickSettings()
Initializes a new instance of the LinearTickSettings class.
Declaration
public LinearTickSettings()
Fields
ColorProperty
Gets or sets the Color property of linear scale ticks. It customizes the color of linear scale ticks. This is a bindable property.
Declaration
public static readonly BindableProperty ColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
LengthProperty
Gets or sets the Length property of linear scale. It customizes the length of ticks. This is a bindable property.
Declaration
public static readonly BindableProperty LengthProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
OffsetProperty
Gets or sets the Offset of the linear scale. It specifies the position of linear scale ticks. This is a bindable property.
Declaration
public static readonly BindableProperty OffsetProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ThicknessProperty
Gets or sets the Thickness property of linear scale. It customizes the thickness of ticks. This is a bindable property.
Declaration
public static readonly BindableProperty ThicknessProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
Color
Gets or sets the Color property of linear scale ticks. It customizes the color of linear scale ticks.
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();
LinearTickSettings ticks = new LinearTickSettings();
ticks.Color = Color.Red;
scale.MajorTickSettings.Add(ticks);
gauge.Scales.Add(scale);
}
Length
Gets or sets the Length property of the linear scale. It customizes the length of ticks. This is a bindable property.
Declaration
public double Length { get; set; }
Property Value
Type | Description |
---|---|
System.Double | This property takes the System.Double as value. |
Examples
This sample shows how to set the Length for the gauge.
void MyPage()
{
SfLinearGauge gauge = new SfLinearGauge();
LinearScale scale = new LinearScale();
LinearTickSettings ticks = new LinearTickSettings();
ticks.Length = 4;
scale.MajorTickSettings.Add(ticks);
gauge.Scales.Add(scale);
}
Offset
Gets or sets the Offset of the linear scale. It specifies the position of ticks in linear scale. 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();
LinearTickSettings ticks = new LinearTickSettings();
ticks.Offset = 0.4;
scale.MajorTickSettings.Add(ticks);
gauge.Scales.Add(scale);
}
Thickness
Gets or sets the Thickness property of linear scale. It customizes the thickness of ticks. This is a bindable property.
Declaration
public double Thickness { get; set; }
Property Value
Type | Description |
---|---|
System.Double | This property takes the System.Double as value. |
Examples
This sample shows how to set the Thickness for the gauge.
void MyPage()
{
SfLinearGauge gauge = new SfLinearGauge();
LinearScale scale = new LinearScale();
LinearTickSettings ticks = new LinearTickSettings();
ticks.Thickness = 4;
scale.MajorTickSettings.Add(ticks);
gauge.Scales.Add(scale);
}