In This Article

CircularScale Class

Represents a scale for use in a CircularGauge.

public class CircularScale : ScaleBase, ILogicalParent, IVisualParent
Inheritance:
object Visual UIElement FrameworkElement GaugeElement ScaleBase 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

CircularScale()

Initializes a new instance of the CircularScale class.

public CircularScale()

Properties

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 scale. This is a dependency property.

public Unit Radius { get; set; }

Property Value

Unit:

The radius, which should be greater than 0. The default value is 30.

StartAngle

Gets or sets the start angle of the scale. This is a dependency property.

public double StartAngle { get; set; }

Property Value

double:

The start angle, which should be between 0 and 360. The default value is 0.

SweepAngle

Gets or sets the sweep angle of the scale. This is a dependency property.

public double SweepAngle { get; set; }

Property Value

double:

The sweep angle, which should be between 0 and 360. The default value is 360

TickSets

Gets the tick-set elements within the scale.

public CircularTickSetCollection TickSets { get; }

Property Value

CircularTickSetCollection:

The tick-sets.

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.

GetStartAngle(DependencyObject)

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

[AttachedPropertyBrowsableForChildren(IncludeDescendants = true)]
public static double GetStartAngle(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object to which the attached property is retrieved.

Returns

double:

The start angle.

GetSweepAngle(DependencyObject)

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

[AttachedPropertyBrowsableForChildren(IncludeDescendants = true)]
public static double GetSweepAngle(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object to which the attached property is retrieved.

Returns

double:

The sweep angle.

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.

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.

SetStartAngle(DependencyObject, double)

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

public static void SetStartAngle(DependencyObject obj, double value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value double

The start angle.

SetSweepAngle(DependencyObject, double)

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

public static void SetSweepAngle(DependencyObject obj, double value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value double

The sweep angle.

Fields

RadiusProperty

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

public static readonly DependencyProperty RadiusProperty

StartAngleProperty

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

public static readonly DependencyProperty StartAngleProperty

SweepAngleProperty

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

public static readonly DependencyProperty SweepAngleProperty

Inherited Members