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

Remarks

For detailed documentation on this control's features and how to use them, please see the Gauge documentation topics.

Constructors

DigitalGauge()

Initializes a new instance of the DigitalGauge class.

public DigitalGauge()

Properties

BlinkInterval

Gets or sets the interval used when LedState is set to Blinking. This is a dependency property.

public Duration BlinkInterval { get; set; }

Property Value

Duration:

The interval used when LedState is set to Blinking. The default value is 500 milliseconds.

CharacterCasing

Gets or sets the character casing. This is a dependency property.

public CharacterCasing CharacterCasing { get; set; }

Property Value

CharacterCasing:

The character casing. The default value is Upper.

CharacterCount

Gets or sets the number of characters displayed. This is a dependency property.

public int CharacterCount { get; set; }

Property Value

int:

The number of characters displayed. The default value is 10.

CharacterHeight

Gets or sets the height of the characters. This is a dependency property.

public double CharacterHeight { get; set; }

Property Value

double:

The height of the characters. The default value is Double.NaN.

CharacterOverflowAlignment

Gets or sets the alignment of the characters when the text is longer than what can be displayed. This is a dependency property.

public DigitalCharacterOverflowAlignment CharacterOverflowAlignment { get; set; }

Property Value

DigitalCharacterOverflowAlignment:

The alignment of the characters when the text is longer than what can be displayed. The default value is DigitalCharacterOverflowAlignment.Left.

CharacterPadding

Gets or sets the padding of the characters displayed. This is a dependency property.

public Thickness CharacterPadding { get; set; }

Property Value

Thickness:

The padding of the characters displayed. The default value is 0.

CharacterSegmentThickness

Gets or sets the thickness of the character segments (not used by all character types). This is a dependency property.

public double CharacterSegmentThickness { get; set; }

Property Value

double:

The thickness of the character segments, or Double.NaN for an automatic thickness. The default value is Double.NaN.

CharacterSpacing

Gets or sets the spacing between characters. This is a dependency property.

public double CharacterSpacing { get; set; }

Property Value

double:

The spacing between characters. The default value is 5 pixels.

CharacterType

Gets or sets the type of the characters displayed. This is a dependency property.

public DigitalCharacterType CharacterType { get; set; }

Property Value

DigitalCharacterType:

The type of the characters displayed. The default value is Segment14Normal

CharacterWidthRatio

Gets or sets the width of the characters as a ratio of the CharacterHeight. This is a dependency property.

public double CharacterWidthRatio { get; set; }

Property Value

double:

The character width ratio. The default value is 0.4 (40%).

DimmedBrush

Gets or sets the dimmed brush, which is used to render the unlit character segments. This is a dependency property.

public Brush DimmedBrush { get; set; }

Property Value

Brush:

The dimmed brush. The default value is #1E000000.

Foreground

Gets or sets the foreground brush, which is used to render the character segments. This is a dependency property.

public Brush Foreground { get; set; }

Property Value

Brush:

The foreground brush. The default value is WhiteSmoke.

LedOffOpacity

Gets or sets the opacity of the led lights when off. This is a dependency property.

public double LedOffOpacity { get; set; }

Property Value

double:

The opacity of the led lights when off. The default value is 0.0.

LedOnOpacity

Gets or sets the opacity of the led lights when on. This is a dependency property.

public double LedOnOpacity { get; set; }

Property Value

double:

The opacity of the led lights when on. The default value is 1.0.

LedState

Gets or sets the current state of the led lights. This is a dependency property.

public LedState LedState { get; set; }

Property Value

LedState:

The current state of the led lights. The default value is LedState.On.

LogicalChildren

Gets an enumerator for logical child elements of this element.

protected override IEnumerator LogicalChildren { get; }

Property Value

IEnumerator

RefreshRate

Gets or sets the refresh rate, which indicates the minimum interval between updates to the value currently being displayed. This is a dependency property.

public Duration RefreshRate { get; set; }

Property Value

Duration:

The refresh rate. The default value is 0 milliseconds.

ScrollInterval

Gets or sets the interval used when scrolling characters. This is a dependency property.

public Duration ScrollInterval { get; set; }

Property Value

Duration:

The interval used when scrolling characters. The default value is 500 milliseconds.

ScrollState

Gets or sets the scroll state, which determines how and when the characters should be scrolled. This is a dependency property.

public DigitalCharacterScrollState ScrollState { get; set; }

Property Value

DigitalCharacterScrollState:

The scroll state. The default value is DigitalCharacterScrollState.None.

SkewAngleX

Gets or sets the skew angle along the X-axis. This is a dependency property.

public double SkewAngleX { get; set; }

Property Value

double:

The skew angle along the X-axis. The default value is 0.

SkewAngleY

Gets or sets the skew angle along the Y-axis. This is a dependency property.

public double SkewAngleY { get; set; }

Property Value

double:

The skew angle along the Y-axis. The default value is 0.

TextAlignment

Gets or sets the alignment of the label text. This is a read-only dependency property.

public DigitalTextAlignment TextAlignment { get; set; }

Property Value

DigitalTextAlignment:

The alignment of the label text. The default value is Right.

Remarks

Valid values are Left or Right.

Value

Gets or sets the value displayed by the gauge. This is a dependency property.

public object Value { get; set; }

Property Value

object:

The value displayed by the gauge. The default value is null.

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

Identifies the BlinkInterval dependency property. This field is read-only.

public static readonly DependencyProperty BlinkIntervalProperty

CharacterCasingProperty

Identifies the CharacterCasing dependency property. This field is read-only.

public static readonly DependencyProperty CharacterCasingProperty

CharacterCountProperty

Identifies the CharacterCount dependency property. This field is read-only.

public static readonly DependencyProperty CharacterCountProperty

CharacterHeightProperty

Identifies the CharacterHeight dependency property. This field is read-only.

public static readonly DependencyProperty CharacterHeightProperty

CharacterOverflowAlignmentProperty

Identifies the CharacterOverflowAlignment dependency property. This field is read-only.

public static readonly DependencyProperty CharacterOverflowAlignmentProperty

CharacterPaddingProperty

Identifies the CharacterPadding dependency property. This field is read-only.

public static readonly DependencyProperty CharacterPaddingProperty

CharacterSegmentThicknessProperty

Identifies the CharacterSegmentThickness dependency property. This field is read-only.

public static readonly DependencyProperty CharacterSegmentThicknessProperty

CharacterSpacingProperty

Identifies the CharacterSpacing dependency property. This field is read-only.

public static readonly DependencyProperty CharacterSpacingProperty

CharacterTypeProperty

Identifies the CharacterType dependency property. This field is read-only.

public static readonly DependencyProperty CharacterTypeProperty

CharacterWidthRatioProperty

Identifies the CharacterWidthRatio dependency property. This field is read-only.

public static readonly DependencyProperty CharacterWidthRatioProperty

DimmedBrushProperty

Identifies the DimmedBrush dependency property. This field is read-only.

public static readonly DependencyProperty DimmedBrushProperty

ForegroundProperty

Identifies the Foreground dependency property. This field is read-only.

public static readonly DependencyProperty ForegroundProperty

LedOffOpacityProperty

Identifies the LedOffOpacity dependency property. This field is read-only.

public static readonly DependencyProperty LedOffOpacityProperty

LedOnOpacityProperty

Identifies the LedOnOpacity dependency property. This field is read-only.

public static readonly DependencyProperty LedOnOpacityProperty

LedStateProperty

Identifies the LedState dependency property. This field is read-only.

public static readonly DependencyProperty LedStateProperty

RefreshRateProperty

Identifies the RefreshRate dependency property. This field is read-only.

public static readonly DependencyProperty RefreshRateProperty

ScrollIntervalProperty

Identifies the ScrollInterval dependency property. This field is read-only.

public static readonly DependencyProperty ScrollIntervalProperty

ScrollStateProperty

Identifies the ScrollState dependency property. This field is read-only.

public static readonly DependencyProperty ScrollStateProperty

SkewAngleXProperty

Identifies the SkewAngleX dependency property. This field is read-only.

public static readonly DependencyProperty SkewAngleXProperty

SkewAngleYProperty

Identifies the SkewAngleY dependency property. This field is read-only.

public static readonly DependencyProperty SkewAngleYProperty

TextAlignmentProperty

Identifies the TextAlignment dependency property. This field is read-only.

public static readonly DependencyProperty TextAlignmentProperty

ValueProperty

Identifies the Value dependency property. This field is read-only.

public static readonly DependencyProperty ValueProperty

Inherited Members