In This Article

RectangularGaugeBase Class

Represents a base class for rectangular gauge controls.

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

Constructors

RectangularGaugeBase()

Initializes an instance of the class.

protected RectangularGaugeBase()

Properties

BackgroundGeometry

The custom geometry used for the frame background.

public Geometry? BackgroundGeometry { get; set; }

Property Value

Geometry

Remarks

This property is only used when BackgroundType is set to CustomBackgroundGeometry.

BackgroundImageSource

The source of a custom image used for the frame background.

public ImageSource? BackgroundImageSource { get; set; }

Property Value

ImageSource

Remarks

This property is only used when BackgroundType is set to CustomBackgroundImage.

BackgroundSizeRatio

The size of the frame background as a ratio of the ActualWidth and ActualHeight properties.

public double BackgroundSizeRatio { get; set; }

Property Value

double:

The default value is 0.88.

BackgroundType

The type of frame background to be rendered.

public RectangularBackgroundType BackgroundType { get; set; }

Property Value

RectangularBackgroundType:

The default value is RoundedRectangleLightGradient.

FrameAngle

The angle of the frame, which is used when rendering the background frame.

protected virtual double FrameAngle { get; }

Property Value

double

FrameType

The type of rectangular frame rendered in the background.

public RectangularFrameType FrameType { get; set; }

Property Value

RectangularFrameType:

The default value is RoundedRectangleDarkerGradient.

GlassType

The type of glass effect rendered, if any.

public RectangularGlassType GlassType { get; set; }

Property Value

RectangularGlassType:

The default value is None.

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.

RimGeometry

The custom geometry used for the frame rim.

public Geometry? RimGeometry { get; set; }

Property Value

Geometry

Remarks

This property is only used when RimType is set to CustomRimGeometry.

RimImageSource

The source of a custom image used for the frame rim.

public ImageSource? RimImageSource { get; set; }

Property Value

ImageSource

Remarks

This property is only used when RimType is set to CustomRimImage.

RimType

The type of frame rim to be rendered.

public RectangularRimType RimType { get; set; }

Property Value

RectangularRimType:

The default value is RoundedRectangleDarkerGradient.

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.

OnRender(DrawingContext)

When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.

protected override void OnRender(DrawingContext drawingContext)
Parameter Type Description
drawingContext DrawingContext

The drawing instructions for a specific element. This context is provided to the layout system.

RenderFrameBackground(DrawingContext)

Renders the background of the frame based on the actual width and height, and the FrameType property.

protected virtual void RenderFrameBackground(DrawingContext drawingContext)
Parameter Type Description
drawingContext DrawingContext

The drawing context.

RenderFrameRim(DrawingContext)

Renders the rim of the frame based on the actual width and height, and the FrameType property.

protected virtual void RenderFrameRim(DrawingContext drawingContext)
Parameter Type Description
drawingContext DrawingContext

The drawing context.

Fields

BackgroundGeometryProperty

Defines the BackgroundGeometry property.

public static readonly DependencyProperty BackgroundGeometryProperty

BackgroundImageSourceProperty

Defines the BackgroundImageSource property.

public static readonly DependencyProperty BackgroundImageSourceProperty

BackgroundSizeRatioProperty

Defines the BackgroundSizeRatio property.

public static readonly DependencyProperty BackgroundSizeRatioProperty

BackgroundTypeProperty

Defines the BackgroundType property.

public static readonly DependencyProperty BackgroundTypeProperty

FrameTypeProperty

Defines the FrameType property.

public static readonly DependencyProperty FrameTypeProperty

GlassTypeProperty

Defines the GlassType property.

public static readonly DependencyProperty GlassTypeProperty

RimGeometryProperty

Defines the RimGeometry property.

public static readonly DependencyProperty RimGeometryProperty

RimImageSourceProperty

Defines the RimImageSource property.

public static readonly DependencyProperty RimImageSourceProperty

RimTypeProperty

Defines the RimType property.

public static readonly DependencyProperty RimTypeProperty

Inherited Members

Extension Methods