In This Article

DigitalGauge Class

Represents a digital gauge control.

public class DigitalGauge : RectangularGaugeBase, ILogicalParent, IVisualParent
Inheritance:
object Visual UIElement FrameworkElement GaugeElement GaugeBase RectangularGaugeBase object
Implements:
ILogicalParent IVisualParent

Constructors

DigitalGauge()

Initializes an instance of the class.

public DigitalGauge()

Properties

BlinkInterval

The interval used when LedState is set to Blinking.

public Duration BlinkInterval { get; set; }

Property Value

Duration:

The default value is 500 milliseconds.

CharacterCasing

The character casing.

public CharacterCasing CharacterCasing { get; set; }

Property Value

CharacterCasing:

The default value is Upper.

CharacterCount

The number of characters displayed.

public int CharacterCount { get; set; }

Property Value

int:

The default value is 10.

CharacterHeight

The height of the characters.

public double CharacterHeight { get; set; }

Property Value

double:

The default value is Double.NaN.

CharacterOverflowAlignment

The alignment of the characters when the text is longer than what can be displayed.

public DigitalCharacterOverflowAlignment CharacterOverflowAlignment { get; set; }

Property Value

DigitalCharacterOverflowAlignment:

The default value is Left.

CharacterPadding

The padding of the characters displayed.

public Thickness CharacterPadding { get; set; }

Property Value

Thickness:

The default value is 0.

CharacterSegmentThickness

The thickness of the character segments (not used by all character types), or Double.NaN for an automatic thickness.

public double CharacterSegmentThickness { get; set; }

Property Value

double:

The default value is Double.NaN.

CharacterSpacing

The spacing between characters.

public double CharacterSpacing { get; set; }

Property Value

double:

The default value is 5 pixels.

CharacterType

The type of the characters displayed.

public DigitalCharacterType CharacterType { get; set; }

Property Value

DigitalCharacterType:

The default value is Segment14Normal.

CharacterWidthRatio

The width of the characters as a ratio of the CharacterHeight.

public double CharacterWidthRatio { get; set; }

Property Value

double:

The default value is 0.4 (40%).

DimmedBrush

The dimmed brush, which is used to render the unlit character segments.

public Brush? DimmedBrush { get; set; }

Property Value

Brush:

The default value is #1E000000.

Foreground

The foreground brush, which is used to render the character segments.

public Brush? Foreground { get; set; }

Property Value

Brush:

The default value is WhiteSmoke.

LedOffOpacity

The opacity of the led lights when off.

public double LedOffOpacity { get; set; }

Property Value

double:

The default value is 0.0.

LedOnOpacity

The opacity of the led lights when on.

public double LedOnOpacity { get; set; }

Property Value

double:

The default value is 1.0.

LedState

The current state of the led lights.

public LedState LedState { get; set; }

Property Value

LedState:

The default value is On.

LogicalChildren

Gets an enumerator for logical child elements of this element.

protected override IEnumerator? LogicalChildren { get; }

Property Value

IEnumerator:

An enumerator for logical child elements of this element.

RefreshRate

The refresh rate, which indicates the minimum interval between updates to the value currently being displayed.

public Duration RefreshRate { get; set; }

Property Value

Duration:

The default value is 0 milliseconds.

ScrollInterval

The interval used when scrolling characters.

public Duration ScrollInterval { get; set; }

Property Value

Duration:

The default value is 500 milliseconds.

ScrollState

The scroll state, which determines how and when the characters should be scrolled.

public DigitalCharacterScrollState ScrollState { get; set; }

Property Value

DigitalCharacterScrollState:

The default value is None.

SkewAngleX

The skew angle along the X-axis.

public double SkewAngleX { get; set; }

Property Value

double:

The default value is 0.

SkewAngleY

The skew angle along the Y-axis.

public double SkewAngleY { get; set; }

Property Value

double:

The default value is 0.

TextAlignment

The alignment of the label text.

public DigitalTextAlignment TextAlignment { get; set; }

Property Value

DigitalTextAlignment:

The default value is Right.

Value

The value displayed by the gauge.

public object? Value { get; set; }

Property Value

object

Methods

ArrangeOverride(Size)

When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.

protected override Size ArrangeOverride(Size finalSize)
Parameter Type Description
finalSize Size

The final area within the parent that this element should use to arrange itself and its children.

Returns

Size:

The actual size used.

MeasureOverride(Size)

When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.

protected override Size MeasureOverride(Size availableSize)
Parameter Type Description
availableSize Size

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns

Size:

The size that this element determines it needs during layout, based on its calculations of child element sizes.

Fields

BlinkIntervalProperty

Defines the BlinkInterval property.

public static readonly DependencyProperty BlinkIntervalProperty

CharacterCasingProperty

Defines the CharacterCasing property.

public static readonly DependencyProperty CharacterCasingProperty

CharacterCountProperty

Defines the CharacterCount property.

public static readonly DependencyProperty CharacterCountProperty

CharacterHeightProperty

Defines the CharacterHeight property.

public static readonly DependencyProperty CharacterHeightProperty

CharacterOverflowAlignmentProperty

Defines the CharacterOverflowAlignment property.

public static readonly DependencyProperty CharacterOverflowAlignmentProperty

CharacterPaddingProperty

Defines the CharacterPadding property.

public static readonly DependencyProperty CharacterPaddingProperty

CharacterSegmentThicknessProperty

Defines the CharacterSegmentThickness property.

public static readonly DependencyProperty CharacterSegmentThicknessProperty

CharacterSpacingProperty

Defines the CharacterSpacing property.

public static readonly DependencyProperty CharacterSpacingProperty

CharacterTypeProperty

Defines the CharacterType property.

public static readonly DependencyProperty CharacterTypeProperty

CharacterWidthRatioProperty

Defines the CharacterWidthRatio property.

public static readonly DependencyProperty CharacterWidthRatioProperty

DimmedBrushProperty

Defines the DimmedBrush property.

public static readonly DependencyProperty DimmedBrushProperty

ForegroundProperty

Defines the Foreground property.

public static readonly DependencyProperty ForegroundProperty

LedOffOpacityProperty

Defines the LedOffOpacity property.

public static readonly DependencyProperty LedOffOpacityProperty

LedOnOpacityProperty

Defines the LedOnOpacity property.

public static readonly DependencyProperty LedOnOpacityProperty

LedStateProperty

Defines the LedState property.

public static readonly DependencyProperty LedStateProperty

RefreshRateProperty

Defines the RefreshRate property.

public static readonly DependencyProperty RefreshRateProperty

ScrollIntervalProperty

Defines the ScrollInterval property.

public static readonly DependencyProperty ScrollIntervalProperty

ScrollStateProperty

Defines the ScrollState property.

public static readonly DependencyProperty ScrollStateProperty

SkewAngleXProperty

Defines the SkewAngleX property.

public static readonly DependencyProperty SkewAngleXProperty

SkewAngleYProperty

Defines the SkewAngleY property.

public static readonly DependencyProperty SkewAngleYProperty

TextAlignmentProperty

Defines the TextAlignment property.

public static readonly DependencyProperty TextAlignmentProperty

ValueProperty

Defines the Value property.

public static readonly DependencyProperty ValueProperty

Inherited Members

Extension Methods