In This Article

ScaleBase Class

Represents the base class for scales.

public abstract class ScaleBase : GaugeElement, ILogicalParent, IVisualParent
Inheritance:
object Visual UIElement FrameworkElement GaugeElement object
Derived:
CircularScale LinearScale
Implements:
ILogicalParent IVisualParent

Remarks

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

Constructors

ScaleBase()

Initializes an instance of the class.

protected ScaleBase()

Properties

Background

Gets or sets the background brush. This is a dependency property.

public Brush Background { get; set; }

Property Value

Brush:

The background brush. The default value is DarkGray.

BarExtent

Gets or sets the extent of the bar. This is a dependency property.

public Unit BarExtent { get; set; }

Property Value

Unit:

The extent of the bar. The default value is 90%.

BorderBrush

Gets or sets the border brush. This is a dependency property.

public Brush BorderBrush { get; set; }

Property Value

Brush:

The border brush. The default value is Black.

BorderDashStyle

Gets or sets the border dash style. This is a dependency property.

public DashStyle BorderDashStyle { get; set; }

Property Value

DashStyle:

The border dash style. The default value is DashStyle.Solid.

BorderWidth

Gets or sets the border width. This is a dependency property.

public double BorderWidth { get; set; }

Property Value

double:

The border width. The default value is 0.

IsBarVisible

Gets or sets a value indicating whether the scale renders an associated bar. This is a dependency property.

public bool IsBarVisible { get; set; }

Property Value

bool:

true if the scale bar visible; otherwise, false. The default value is true.

Methods

GetBarExtent(DependencyObject)

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

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

The object to which the attached property is retrieved.

Returns

Unit:

The bar width.

OnCreateAutomationPeer()

Creates an appropriate ScaleBaseAutomationPeer for this control as part of the WPF infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

SetBarExtent(DependencyObject, Unit)

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

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

The object to which the attached property is written.

value Unit

The bar extent.

Fields

BackgroundProperty

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

public static readonly DependencyProperty BackgroundProperty

BarExtentProperty

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

public static readonly DependencyProperty BarExtentProperty

BorderBrushProperty

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

public static readonly DependencyProperty BorderBrushProperty

BorderDashStyleProperty

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

public static readonly DependencyProperty BorderDashStyleProperty

BorderWidthProperty

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

public static readonly DependencyProperty BorderWidthProperty

IsBarVisibleProperty

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

public static readonly DependencyProperty IsBarVisibleProperty

Inherited Members