Class ScaleBase
Base class for all scales.
Inheritance
Namespace: Telerik.Windows.Controls.Gauge
Assembly: Telerik.Windows.Controls.DataVisualization.dll
Syntax
public abstract class ScaleBase : ItemsControl, IThemable
Constructors
ScaleBase()
Initializes a new instance of the ScaleBase class.
Declaration
protected ScaleBase()
Fields
CustomItemsProperty
Identifies the CustomItems dependency property.
Declaration
public static readonly DependencyProperty CustomItemsProperty
Field Value
System.Windows.DependencyProperty
|
CustomItemTemplateProperty
Identifies the CustomItemTemplate dependency property.
Declaration
public static readonly DependencyProperty CustomItemTemplateProperty
Field Value
System.Windows.DependencyProperty
|
CustomItemTemplateSelectorProperty
Identifies the CustomItemTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty CustomItemTemplateSelectorProperty
Field Value
System.Windows.DependencyProperty
|
MaxProperty
Identifies the Max dependency property.
Declaration
public static readonly DependencyProperty MaxProperty
Field Value
System.Windows.DependencyProperty
|
MinProperty
Identifies the Min dependency property.
Declaration
public static readonly DependencyProperty MinProperty
Field Value
System.Windows.DependencyProperty
|
MultiplierProperty
Identifies the Multiplier dependency property.
Declaration
public static readonly DependencyProperty MultiplierProperty
Field Value
System.Windows.DependencyProperty
|
RangesProperty
Identifies the Ranges dependency property.
Declaration
public static readonly DependencyProperty RangesProperty
Field Value
System.Windows.DependencyProperty
|
RangeTemplateProperty
Identifies the RangeTemplate dependency property.
Declaration
public static readonly DependencyProperty RangeTemplateProperty
Field Value
System.Windows.DependencyProperty
|
Properties
CellSize
Gets cell size of the scale object. This property supports internal gauge infrastructure and it shouldn't be used from the customer's code.
Declaration
public Size CellSize { get; }
Property Value
System.Windows.Size
|
CustomItems
Gets or sets collection of the custom items.
Declaration
public GaugeCustomItemCollection CustomItems { get; set; }
Property Value
GaugeCustomItemCollection
|
CustomItemTemplate
Gets or sets template of the custom item.
Declaration
public DataTemplate CustomItemTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
CustomItemTemplateSelector
Gets or sets custom item template selector.
Declaration
public DataTemplateSelector CustomItemTemplateSelector { get; set; }
Property Value
System.Windows.Controls.DataTemplateSelector
|
DefaultRangeGroup
Gets default group of the ranges.
Declaration
protected GaugeRangeGroup DefaultRangeGroup { get; }
Property Value
GaugeRangeGroup
|
Indicators
Gets collection of the scale indicators.
Declaration
public UIElementCollection Indicators { get; }
Property Value
System.Windows.Controls.UIElementCollection
|
Max
Gets or sets maximum value of the scale.
Declaration
public double Max { get; set; }
Property Value
System.Double
|
Min
Gets or sets minimum value of the scale.
Declaration
public double Min { get; set; }
Property Value
System.Double
|
Multiplier
Gets or sets the scale multiplier.
Declaration
public double Multiplier { get; set; }
Property Value
System.Double
|
Ranges
Gets or sets scale ranges.
Declaration
public GaugeRangeCollection Ranges { get; set; }
Property Value
GaugeRangeCollection
|
RangeTemplate
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.
Declaration
public DataTemplate RangeTemplate { get; set; }
Property Value
System.Windows.DataTemplate
|
Methods
ArrangeOverride(Size)
Called to arrange and size the content of a scale.
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
System.Windows.Size
finalSize
The computed size that is used to arrange the content. |
Returns
System.Windows.Size
The size of the scale. |
CalculateCellSize()
Calculate cell size of the scale.
Declaration
protected virtual Size CalculateCellSize()
Returns
System.Windows.Size
|
ClearContainerForItemOverride(DependencyObject, Object)
Undoes the effects of the PrepareContainerForItemOverride method.
Declaration
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters
System.Windows.DependencyObject
element
The container element. |
System.Object
item
The item. |
GetContainerForItemOverride()
Returns new ContentPresenter object.
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
System.Windows.DependencyObject
ContentPresenter object. |
GetObjectPosition(FrameworkElement, ScaleObjectLocation, GaugeMeasure, Double)
Gets position of the object over the scale.
Declaration
protected abstract Point GetObjectPosition(FrameworkElement element, ScaleObjectLocation location, GaugeMeasure offset, double value)
Parameters
System.Windows.FrameworkElement
element
Element to get position. |
ScaleObjectLocation
location
Scale object location. |
GaugeMeasure
offset
Offset from the location. |
System.Double
value
Value along the scale. |
Returns
System.Windows.Point
Position of the object over the scale. |
IsItemItsOwnContainerOverride(Object)
Determines if the specified item is (or is eligible to be) its own container.
Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
System.Object
item
The item to check. |
Returns
System.Boolean
True if the item is (or is eligible to be) its own container; otherwise, false. |
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.
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
System.Windows.Size
availableSize
The maximum size that the method can return. |
Returns
System.Windows.Size
The size of the control, up to the maximum specified by constraint. |
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
The type-specific System.Windows.Automation.Peers.AutomationPeer implementation. |
PositionObject(DependencyObject)
Position object using relative measurement. This method supports internal gauge infrastructure and it shouldn't be used from the customer's code.
Declaration
public void PositionObject(DependencyObject scaleObject)
Parameters
System.Windows.DependencyObject
scaleObject
Scale object. |
PresenterSizeChanged(Object, SizeChangedEventArgs)
Occurs when size of the content presenter is changed.
Declaration
protected virtual void PresenterSizeChanged(object sender, SizeChangedEventArgs e)
Parameters
System.Object
sender
Sender. |
System.Windows.SizeChangedEventArgs
e
Event args. |
ResetTheme()
Resets the theme.
Declaration
public void ResetTheme()
ResizeObject(DependencyObject)
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.
Declaration
public void ResizeObject(DependencyObject scaleObject)
Parameters
System.Windows.DependencyObject
scaleObject
Scale object. |
ScaleObjectChanged(FrameworkElement)
Notifies that the element is changed.
Declaration
protected virtual void ScaleObjectChanged(FrameworkElement element)
Parameters
System.Windows.FrameworkElement
element
Element. |
UpdateTicksAndLabels()
Update ticks and labels on the scale.
Declaration
protected virtual void UpdateTicksAndLabels()