menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfDigitalGauge - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfDigitalGauge

    The digital gauge control is used to display alphanumeric characters in digital (LED display) mode. This control displays a range of values that uses characters in combination with numbers.

    Inheritance
    System.Object
    SfDigitalGauge
    Implements
    Microsoft.Maui.IContentView
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Namespace: Syncfusion.Maui.Gauges
    Assembly: Syncfusion.Maui.Gauges.dll
    Syntax
    public class SfDigitalGauge : View, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout, IDigitalGaugeInfo, IParentThemeElement, IThemeElement
    Examples

    The following code demonstrates, how to initialize the SfDigitalGauge control.

    • XAML
    • C#
    <DigitalGauge:SfDigitalGauge x:Name="DigitalGauge"
                         Text = "1234" />
    </DigitalGauge:SfDigitalGauge>
    this.DigitalGauge.Text = "1234";

    Constructors

    SfDigitalGauge()

    Initializes a new instance of the SfDigitalGauge class.

    Declaration
    public SfDigitalGauge()

    Fields

    CharacterHeightProperty

    Identifies the CharacterHeight dependency property.

    Declaration
    public static readonly BindableProperty CharacterHeightProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for CharacterHeight dependency property.

    CharacterSpacingProperty

    Identifies the CharacterSpacing dependency property.

    Declaration
    public static readonly BindableProperty CharacterSpacingProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for CharacterSpacing dependency property.

    CharacterStrokeProperty

    Identifies the CharacterStroke dependency property.

    Declaration
    public static readonly BindableProperty CharacterStrokeProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for CharacterStroke dependency property.

    CharacterTypeProperty

    Identifies the CharacterType dependency property.

    Declaration
    public static readonly BindableProperty CharacterTypeProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for CharacterType dependency property.

    CharacterWidthProperty

    Identifies the CharacterWidth dependency property.

    Declaration
    public static readonly BindableProperty CharacterWidthProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for CharacterWidth dependency property.

    DisabledSegmentAlphaProperty

    Identifies the DisabledSegmentAlpha dependency property.

    Declaration
    public static readonly BindableProperty DisabledSegmentAlphaProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for DisabledSegmentAlpha dependency property.

    DisabledSegmentStrokeProperty

    Identifies the DisabledSegmentStroke dependency property.

    Declaration
    public static readonly BindableProperty DisabledSegmentStrokeProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for DisabledSegmentStroke dependency property.

    StrokeWidthProperty

    Identifies the StrokeWidth dependency property.

    Declaration
    public static readonly BindableProperty StrokeWidthProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for StrokeWidth dependency property.

    TextProperty

    Identifies the Text dependency property.

    Declaration
    public static readonly BindableProperty TextProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for Text dependency property.

    Properties

    CharacterHeight

    Gets or sets the character height of the digital gauge. This property customizes the height of each character in the gauge.

    Declaration
    public double CharacterHeight { get; set; }
    Property Value
    Type Description
    System.Double

    The default value of CharacterHeight is 60d/>.

    Examples

    The following code demonstrates, how to use the CharacterHeight property in the digital gauge #XAML

    <DigitalGauge:SfDigitalGauge x:Name="DigitalGauge"
                         CharacterHeight = "70" />
    </DigitalGauge:SfDigitalGauge>
    • C#
    this.DigitalGauge.CharacterHeight = 70;

    CharacterSpacing

    Gets or sets the character spacing of the digital gauge. This property specifies the spacing between characters in the gauge.

    Declaration
    public double CharacterSpacing { get; set; }
    Property Value
    Type Description
    System.Double

    The default value of CharacterSpacing is 8d/>.

    Examples

    The following code demonstrates, how to use the CharacterSpacing property in the digital gauge #XAML

    <DigitalGauge:SfDigitalGauge x:Name="DigitalGauge"
                         CharacterSpacing = "10" />
    </DigitalGauge:SfDigitalGauge>
    • C#
    this.DigitalGauge.CharacterSpacing = 10;

    CharacterStroke

    Gets or sets the character stroke color of the digital gauge.

    Declaration
    public Brush CharacterStroke { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.Brush

    The default value of CharacterStroke is "#49454F"/>.

    Examples

    The following code demonstrates, how to use the CharacterStroke property in the digital gauge #XAML

    <DigitalGauge:SfDigitalGauge x:Name="DigitalGauge"
                         CharacterStroke = "Orange" />
    </DigitalGauge:SfDigitalGauge>
    • C#
    this.DigitalGauge.CharacterStroke = Colors.Orange;

    CharacterType

    Gets or sets the character type of the digital gauge.

    Declaration
    public DigitalGaugeCharacterType CharacterType { get; set; }
    Property Value
    Type Description
    DigitalGaugeCharacterType

    The default value of CharacterType is SevenSegment.

    Examples

    The following code demonstrates, how to use the CharacterType property in the digital gauge #XAML

    <DigitalGauge:SfDigitalGauge x:Name="DigitalGauge"
                         CharacterType = "FourteenSegment" />
    </DigitalGauge:SfDigitalGauge>
    • C#
    this.DigitalGauge.CharacterType = CharacterType.SevenSegment;

    CharacterWidth

    Gets or sets the character width of the digital gauge. This property customizes the width of each character in the gauge.

    Declaration
    public double CharacterWidth { get; set; }
    Property Value
    Type Description
    System.Double

    The default value of CharacterWidth is 40d/>.

    Examples

    The following code demonstrates, how to use the CharacterWidth property in the digital gauge #XAML

    <DigitalGauge:SfDigitalGauge x:Name="DigitalGauge"
                         CharacterWidth = "50" />
    </DigitalGauge:SfDigitalGauge>
    • C#
    this.DigitalGauge.CharacterWidth = 50;

    DisabledSegmentAlpha

    Gets or sets the disabled segment alpha of the digital gauge. This property customizes the transparency of disabled segments in the gauge.

    Declaration
    public float DisabledSegmentAlpha { get; set; }
    Property Value
    Type Description
    System.Single

    The default value of DisabledSegmentAlpha is 1f/>.

    Remarks

    The minimum value is 0, and maximum value is 1.

    Examples

    The following code demonstrates, how to use the DisabledSegmentAlpha property in the digital gauge #XAML

    <DigitalGauge:SfDigitalGauge x:Name="DigitalGauge"
                         DisabledSegmentAlpha = "0.5f" />
    </DigitalGauge:SfDigitalGauge>
    • C#
    this.DigitalGauge.DisabledSegmentAlpha = 0.5f;

    DisabledSegmentStroke

    Gets or sets the disabled segment color of the digital gauge.

    Declaration
    public Brush DisabledSegmentStroke { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.Brush

    The default value of DisabledSegmentStroke is "#E7E0EC"/>.

    Examples

    The following code demonstrates, how to use the DisabledSegmentStroke property in the digital gauge #XAML

    <DigitalGauge:SfDigitalGauge x:Name="DigitalGauge"
                        DisabledSegmentStroke="Gray" />
    </DigitalGauge:SfDigitalGauge>
    • C#
    this.DigitalGauge.DisabledSegmentStroke = Colors.Gray;

    StrokeWidth

    Gets or sets the segment stroke width of the digital gauge. This property customizes the stroke width of each segment in the gauge.

    Declaration
    public double StrokeWidth { get; set; }
    Property Value
    Type Description
    System.Double

    The default value of StrokeWidth is 6d/>.

    Examples

    The following code demonstrates, how to use the StrokeWidth property in the digital gauge #XAML

    <DigitalGauge:SfDigitalGauge x:Name="DigitalGauge"
                         StrokeWidth = "8" />
    </DigitalGauge:SfDigitalGauge>
    • C#
    this.DigitalGauge.StrokeWidth = 8;

    Text

    Gets or sets the display text of the digital gauge. This property specifies the text to be displayed within the gauge.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    The default value of Text is System.String.Empty.

    Examples

    The following code demonstrates, how to use the Text property in the digital gauge #XAML

    <DigitalGauge:SfDigitalGauge x:Name="DigitalGauge"
                         Text = "1234" />
    </DigitalGauge:SfDigitalGauge>
    • C#
    this.DigitalGauge.Text = "1234";

    Events

    TextChanged

    Occurs whenever the text value is changed.

    Declaration
    public event EventHandler<DigitalGaugeTextChangedEventArgs> TextChanged
    Event Type
    Type
    System.EventHandler<DigitalGaugeTextChangedEventArgs>

    Implements

    Microsoft.Maui.IContentView
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved