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

Remarks

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

Constructors

RectangularGaugeBase()

Initializes a new instance of the RectangularGaugeBase class.

protected RectangularGaugeBase()

Properties

BackgroundGeometry

Gets or sets the custom geometry used for the frame background. This is a dependency property.

public Geometry BackgroundGeometry { get; set; }

Property Value

Geometry:

A custom geometry for the frame background. The default value is null.

Remarks

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

BackgroundImageSource

Gets or sets the source of a custom image used for the frame background. This is a dependency property.

public ImageSource BackgroundImageSource { get; set; }

Property Value

ImageSource:

The image source for the frame background. The default value is null.

Remarks

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

BackgroundSizeRatio

Gets or sets the size of the frame background as a ratio of the ActualWidth and ActualHeight properties. This is a dependency property.

public double BackgroundSizeRatio { get; set; }

Property Value

double:

the size of the frame background as a ratio of the ActualWidth and ActualHeight properties. The default value is 0.88.

BackgroundType

Gets or sets the type of frame background to be rendered. This is a dependency property.

public RectangularBackgroundType BackgroundType { get; set; }

Property Value

RectangularBackgroundType:

The type of frame background to be rendered. The default value is RectangularBackgroundType.RoundedRectangleLightGradient.

FrameAngle

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

protected virtual double FrameAngle { get; }

Property Value

double:

The frame angle.

FrameType

Gets or sets the type of rectangular frame rendered in the background. This is a dependency property.

public RectangularFrameType FrameType { get; set; }

Property Value

RectangularFrameType:

The frame type. The default value is RoundedRectangleDarkerGradient.

GlassType

Gets or sets the type of glass effect rendered, if any. This is a dependency property.

public RectangularGlassType GlassType { get; set; }

Property Value

RectangularGlassType:

The type of glass rendered, if any. The default value is RectangularGlassType.None.

LogicalChildren

Gets an enumerator for logical child elements of this element.

protected override IEnumerator LogicalChildren { get; }

Property Value

IEnumerator

RimGeometry

Gets or sets the custom geometry used for the frame rim. This is a dependency property.

public Geometry RimGeometry { get; set; }

Property Value

Geometry:

A custom geometry for the frame rim. The default value is null.

Remarks

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

RimImageSource

Gets or sets the source of a custom image used for the frame rim. This is a dependency property.

public ImageSource RimImageSource { get; set; }

Property Value

ImageSource:

The image source for the frame rim. The default value is null.

Remarks

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

RimType

Gets or sets the type of frame rim to be rendered. This is a dependency property.

public RectangularRimType RimType { get; set; }

Property Value

RectangularRimType:

The type of frame rim to be rendered. The default value is RectangularRimType.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

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

public static readonly DependencyProperty BackgroundGeometryProperty

BackgroundImageSourceProperty

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

public static readonly DependencyProperty BackgroundImageSourceProperty

BackgroundSizeRatioProperty

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

public static readonly DependencyProperty BackgroundSizeRatioProperty

BackgroundTypeProperty

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

public static readonly DependencyProperty BackgroundTypeProperty

FrameTypeProperty

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

public static readonly DependencyProperty FrameTypeProperty

GlassTypeProperty

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

public static readonly DependencyProperty GlassTypeProperty

RimGeometryProperty

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

public static readonly DependencyProperty RimGeometryProperty

RimImageSourceProperty

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

public static readonly DependencyProperty RimImageSourceProperty

RimTypeProperty

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

public static readonly DependencyProperty RimTypeProperty

Inherited Members