Class Header
Represents the gauge header. To render this header, create an instance of header class and set required properties.
Inheritance
Namespace: Syncfusion.SfGauge.XForms
Assembly: Syncfusion.SfGauge.XForms.dll
Syntax
public class Header : Element, IThemeElement
Constructors
Header()
Initializes a new instance of the Header class to set required header properties in circular gauge header.
Declaration
public Header()
Fields
FontAttributesProperty
Gets or sets font attributes for the Header property. It changes the font style for the circular 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. This property changes the font family of header text in circular 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 header. It changes the gauge 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 header. It changes the foreground color for circular gauge header. This is a bindable property.
Declaration
public static readonly BindableProperty ForegroundColorProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
HorizontalHeaderPositionProperty
Gets or sets the position of gauge header view. It customizes the gauge horizontal header position. This is bindable property.
Declaration
public static readonly BindableProperty HorizontalHeaderPositionProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
PositionProperty
Gets or sets the position of the header. It changes the horizontal and vertical positions of gauge 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 header. It changes the circular 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 header. It changes the circular gauge header text size. This is a bindable property.
Declaration
public static readonly BindableProperty TextSizeProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
VerticalHeaderPositionProperty
Gets or sets the vertical position of gauge header view. It customizes the gauge vertical header position. This is bindable property.
Declaration
public static readonly BindableProperty VerticalHeaderPositionProperty
Field Value
| Type |
|---|
| Xamarin.Forms.BindableProperty |
Properties
Font
Gets or sets the font of the header. This property 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 value. |
Examples
This sample shows how to set the Font of the header.
void MyPage()
{
SfCircularGauge gauge = new SfCircularGauge();
Header header = new Header();
header.Font = new Font();
gauge.Headers.Add(header);
}
FontAttributes
Gets or sets font attributes for gauge Header. It changes the font style for the circular 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 circular 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 header. It changes the foreground color for circular gauge header.
Declaration
public Color ForegroundColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Xamarin.Forms.Color | This property takes the System.String value. |
Examples
This sample shows how to set the ForegroundColor of the header.
void MyPage()
{
SfCircularGauge gauge = new SfCircularGauge();
Header header = new Header();
header.ForegroundColor = Color.Red;
gauge.Headers.Add(header);
}
HorizontalHeaderPosition
Gets or sets the horizontal position of gauge header. This property customizes the gauge horizontal header position.
Declaration
public ViewAlignment HorizontalHeaderPosition { get; set; }
Property Value
| Type |
|---|
| ViewAlignment |
Position
Gets or sets the position of the header. It changes the horizontal and vertical positions of gauge header.
Declaration
public Point Position { get; set; }
Property Value
| Type | Description |
|---|---|
| Xamarin.Forms.Point | This property takes the Xamarin.Forms.Point value. |
Examples
This sample shows how to set the Position of the header.
void MyPage()
{
SfCircularGauge gauge = new SfCircularGauge();
Header header = new Header();
header.Position = new Point(0.5, 0.5);
gauge.Headers.Add(header);
}
Text
Gets or sets the text of the header. It changes the circular gauge header text. This is a bindable property.
Declaration
public string Text { get; set; }
Property Value
| Type |
|---|
| System.String |
TextSize
Gets or sets the text size of the header. It changes the circular gauge header text size. This is a bindable property.
Declaration
public double TextSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double | This property takes the System.Double value. |
Examples
This sample shows how to set the TextSize of the header.
void MyPage()
{
SfCircularGauge gauge = new SfCircularGauge();
Header header = new Header();
header.TextSize = 20;
gauge.Headers.Add(header);
}
VerticalHeaderPosition
Gets or sets the vertical view position of gauge header. It customizes the gauge vertical header position.
Declaration
public ViewAlignment VerticalHeaderPosition { get; set; }
Property Value
| Type |
|---|
| ViewAlignment |