In This Article

CircularGaugeBase Class

Represents a circular gauge control.

public abstract class CircularGaugeBase : GaugeBase, ILogicalParent, IVisualParent
Inheritance:
object Visual UIElement FrameworkElement GaugeElement GaugeBase object
Derived:
CircularGauge FlipSwitch Led
Implements:
ILogicalParent IVisualParent

Remarks

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

Constructors

CircularGaugeBase()

Initializes a new instance of the CircularGaugeBase class.

protected CircularGaugeBase()

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 CircularBackgroundType.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 CircularBackgroundType.CustomBackgroundImage.

BackgroundRadiusRatio

Gets or sets the radius of the frame background as a ratio of the Radius property. This is a dependency property.

public double BackgroundRadiusRatio { get; set; }

Property Value

double:

The radius of the frame background as a ratio of the Radius property. The default value is 0.7846.

BackgroundType

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

public CircularBackgroundType BackgroundType { get; set; }

Property Value

CircularBackgroundType:

The type of frame background to be rendered. The default value is CircularBackgroundType.CircularOrb.

FrameType

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

public CircularFrameType FrameType { get; set; }

Property Value

CircularFrameType:

The type of frame rendered. The default value is CircularOrb.

GlassType

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

public CircularGlassType GlassType { get; set; }

Property Value

CircularGlassType:

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

LogicalChildren

Gets an enumerator for logical child elements of this element.

protected override IEnumerator LogicalChildren { get; }

Property Value

IEnumerator

Radius

Gets or sets the radius of the gauge. This is a dependency property.

public Unit Radius { get; set; }

Property Value

Unit:

The radius. The default value is 100 pixels.

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 CircularRimType.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 CircularRimType.CustomRimImage.

RimType

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

public CircularRimType RimType { get; set; }

Property Value

CircularRimType:

The type of frame rim to be rendered. The default value is CircularRimType.CircularThinRim.

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.

GetRadius(DependencyObject)

Gets the value of the RadiusProperty attached property for a specified object.

[AttachedPropertyBrowsableForChildren(IncludeDescendants = true)]
public static Unit GetRadius(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object to which the attached property is retrieved.

Returns

Unit:

The radius.

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 and Radius properties.

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 and Radius properties.

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

The drawing context.

SetRadius(DependencyObject, Unit)

Sets the value of the RadiusProperty attached property to a specified object.

public static void SetRadius(DependencyObject obj, Unit value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value Unit

The radius.

UpdateUnitBases()

Updates UnitBaseX and UnitBaseY.

protected override void UpdateUnitBases()

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

BackgroundRadiusRatioProperty

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

public static readonly DependencyProperty BackgroundRadiusRatioProperty

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

RadiusProperty

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

public static readonly DependencyProperty RadiusProperty

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