Class LinearHeader
Represents the linear gauge header. To render this, create an instance of LinearHeader, and set required properties.
Inheritance
Namespace: Syncfusion.SfGauge.XForms
Assembly: Syncfusion.SfGauge.XForms.dll
Syntax
public class LinearHeader : Element, IThemeElement
Constructors
LinearHeader()
Initializes a new instance of the LinearHeader class to set required header properties in linear gauge header.
Declaration
public LinearHeader()
Fields
FontAttributesProperty
Gets or sets the font attributes for linear header. It changes the font style for the linear gauge header. This is bindable property.
Declaration
public static readonly BindableProperty FontAttributesProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
FontFamilyProperty
Gets or sets the font family of the text. It changes the font family of header text in linear gauge. This is a bindable property.
Declaration
public static readonly BindableProperty FontFamilyProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
FontProperty
Gets or sets the font of the linear header. It changes the linear header size, font family, and font weight. This is bindable property.
Declaration
public static readonly BindableProperty FontProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ForegroundColorProperty
Gets or sets the foreground color of the linear header. It changes the foreground color for linear gauge header. This is bindable property.
Declaration
public static readonly BindableProperty ForegroundColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
OffsetProperty
Gets or sets the Offset of the linear header. It changes the horizontal and vertical offsets of gauge header. This is bindable property.
Declaration
public static readonly BindableProperty OffsetProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
PositionProperty
Gets or sets the position of the linear header. It changes the horizontal and vertical position of linear header. This is bindable property.
Declaration
public static readonly BindableProperty PositionProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TextProperty
Gets or sets the text property of the linear header. It changes the linear gauge header text. This is bindable property.
Declaration
public static readonly BindableProperty TextProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TextSizeProperty
Gets or sets the text size property of the linear header. It changes the linear gauge header text size. This is a bindable property.
Declaration
public static readonly BindableProperty TextSizeProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
Font
Gets or sets the font of the linear header. It changes the gauge header size, font family, and font weight.
Declaration
public Font Font { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Font | This property takes the Font as value. |
Examples
This sample shows how to set the Font for the gauge.
void MyPage()
{
SfLinearGauge gauge = new SfLinearGauge();
LinearScale scale = new LinearScale();
LinearHeader header = new LinearHeader();
header.Font = new Font();
scale.Headers.Add(range);
gauge.Scales.Add(scale);
}
FontAttributes
Gets or sets font attributes for linear header. It changes the font style for the linear gauge header.
Declaration
public FontAttributes FontAttributes { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.FontAttributes | This property takes the FontAttributesvalue. |
FontFamily
Gets or sets the font family of the text. It changes the font family of header text in linear gauge.
Declaration
public string FontFamily { get; set; }
Property Value
Type | Description |
---|---|
System.String | The font family of the text. |
ForegroundColor
Gets or sets the foreground color of the linear header. It changes the foreground color for the linear gauge header.
Declaration
public Color ForegroundColor { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Color | This property takes the Xamarin.Forms.Color as value. |
Examples
This sample shows how to set the ForegroundColor for the gauge.
void MyPage()
{
SfLinearGauge gauge = new SfLinearGauge();
LinearScale scale = new LinearScale();
LinearHeader header = new LinearHeader();
header.ForegroundColor = Color.Red;
scale.Headers.Add(range);
gauge.Scales.Add(scale);
}
Offset
Gets or sets the offset of the linear header. It changes the horizontal and vertical offsets of linear header.
Declaration
public Point Offset { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Point | This property takes the Xamarin.Forms.Point as value. |
Examples
This sample shows how to set the Offset for the gauge.
void MyPage()
{
SfLinearGauge gauge = new SfLinearGauge();
LinearScale scale = new LinearScale();
LinearHeader header = new LinearHeader();
header.Position = new Point(0.5, 0.7);
scale.Headers.Add(range);
gauge.Scales.Add(scale);
}
Position
Gets or sets the position of the linear header. It changes the horizontal and vertical positions of the linear gauge header.
Declaration
public Point Position { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Point | This property takes the Xamarin.Forms.Point as value. |
Examples
This sample shows how to set the Position for the gauge.
void MyPage()
{
SfLinearGauge gauge = new SfLinearGauge();
LinearScale scale = new LinearScale();
LinearHeader header = new LinearHeader();
header.Position = new Point(0.5, 0.7);
scale.Headers.Add(range);
gauge.Scales.Add(scale);
}
Text
Gets or sets the text of the linear header. It changes the linear gauge header text. This is a bindable property.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | This property takes the System.String as value. |
Examples
This sample shows how to set the Text for the gauge.
void MyPage()
{
SfLinearGauge gauge = new SfLinearGauge();
LinearScale scale = new LinearScale();
LinearHeader header = new LinearHeader();
header.Text = "Syncfusion";
scale.Headers.Add(range);
gauge.Scales.Add(scale);
}
TextSize
Gets or sets the text size of the linear header. It changes the linear gauge header text size. This is a bindable property.
Declaration
public double TextSize { get; set; }
Property Value
Type |
---|
System.Double |