New to Telerik UI for WPFStart a free 30-day trial

Base class for all scales.

Definition

Namespace:Telerik.Windows.Controls.Gauge

Assembly:Telerik.Windows.Controls.DataVisualization.dll

Syntax:

C#
public abstract class ScaleBase : ItemsControl

Inheritance: objectScaleBase

Derived Classes: GraphicScaleNumericScale

Constructors

Initializes a new instance of the ScaleBase class.

C#
protected ScaleBase()

Fields

CustomItemsProperty

DependencyProperty

Identifies the CustomItems dependency property.

C#
public static readonly DependencyProperty CustomItemsProperty

CustomItemTemplateProperty

DependencyProperty

Identifies the CustomItemTemplate dependency property.

C#
public static readonly DependencyProperty CustomItemTemplateProperty

Identifies the CustomItemTemplateSelector dependency property.

C#
public static readonly DependencyProperty CustomItemTemplateSelectorProperty

MaxProperty

DependencyProperty

Identifies the Max dependency property.

C#
public static readonly DependencyProperty MaxProperty

MinProperty

DependencyProperty

Identifies the Min dependency property.

C#
public static readonly DependencyProperty MinProperty

MultiplierProperty

DependencyProperty

Identifies the Multiplier dependency property.

C#
public static readonly DependencyProperty MultiplierProperty

RangesProperty

DependencyProperty

Identifies the Ranges dependency property.

C#
public static readonly DependencyProperty RangesProperty

RangeTemplateProperty

DependencyProperty

Identifies the RangeTemplate dependency property.

C#
public static readonly DependencyProperty RangeTemplateProperty

Properties

Gets cell size of the scale object. This property supports internal gauge infrastructure and it shouldn't be used from the customer's code.

C#
public Size CellSize { get; }

Gets or sets collection of the custom items.

C#
public GaugeCustomItemCollection CustomItems { get; set; }

CustomItemTemplate

DataTemplate

Gets or sets template of the custom item.

C#
public DataTemplate CustomItemTemplate { get; set; }

CustomItemTemplateSelector

DataTemplateSelector

Gets or sets custom item template selector.

C#
public DataTemplateSelector CustomItemTemplateSelector { get; set; }

Gets default group of the ranges.

C#
protected GaugeRangeGroup DefaultRangeGroup { get; }

Indicators

UIElementCollection

Gets collection of the scale indicators.

C#
public UIElementCollection Indicators { get; }

Gets or sets maximum value of the scale.

C#
public double Max { get; set; }

Gets or sets minimum value of the scale.

C#
public double Min { get; set; }

Gets or sets the scale multiplier.

C#
public double Multiplier { get; set; }

Gets or sets scale ranges.

C#
public GaugeRangeCollection Ranges { get; set; }

RangeTemplate

DataTemplate

Gets or sets the data template of the range. This property supports internal gauge infrastructure and it shouldn't be used from the customer's code.

C#
public DataTemplate RangeTemplate { get; set; }

Methods

Called to arrange and size the content of a scale.

C#
protected override Size ArrangeOverride(Size finalSize)
Parameters:finalSizeSize

The computed size that is used to arrange the content.

Returns:

Size

The size of the scale.

Calculate cell size of the scale.

C#
protected virtual Size CalculateCellSize()
Returns:

Size

Undoes the effects of the PrepareContainerForItemOverride method.

C#
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters:elementDependencyObject

The container element.

itemobject

The item.

Returns new ContentPresenter object.

C#
protected override DependencyObject GetContainerForItemOverride()
Returns:

DependencyObject

ContentPresenter object.

Gets position of the object over the scale.

C#
protected abstract Point GetObjectPosition(FrameworkElement element, ScaleObjectLocation location, GaugeMeasure offset, double value)
Parameters:elementFrameworkElement

Element to get position.

locationScaleObjectLocation

Scale object location.

offsetGaugeMeasure

Offset from the location.

valuedouble

Value along the scale.

Returns:

Point

Position of the object over the scale.

Determines if the specified item is (or is eligible to be) its own container.

C#
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters:itemobject

The item to check.

Returns:

bool

True if the item is (or is eligible to be) its own container; otherwise, false.

When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.

C#
protected override Size MeasureOverride(Size availableSize)
Parameters:availableSizeSize

The maximum size that the method can return.

Returns:

Size

The size of the control, up to the maximum specified by constraint.

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate.

C#
public override void OnApplyTemplate()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

The type-specific AutomationPeer implementation.

Position object using relative measurement. This method supports internal gauge infrastructure and it shouldn't be used from the customer's code.

C#
public void PositionObject(DependencyObject scaleObject)
Parameters:scaleObjectDependencyObject

Scale object.

Occurs when size of the content presenter is changed.

C#
protected virtual void PresenterSizeChanged(object sender, SizeChangedEventArgs e)
Parameters:senderobject

Sender.

eSizeChangedEventArgs

Event args.

Resets the theme.

C#
public void ResetTheme()

Calculate size of the object using relative measurement. This method supports internal gauge infrastructure and it shouldn't be used from the customer's code.

C#
public void ResizeObject(DependencyObject scaleObject)
Parameters:scaleObjectDependencyObject

Scale object.

Notifies that the element is changed.

C#
protected virtual void ScaleObjectChanged(FrameworkElement element)
Parameters:elementFrameworkElement

Element.

Update ticks and labels on the scale.

C#
protected virtual void UpdateTicksAndLabels()