GraphicScale
Base class for the radial and linear scales.
Definition
Namespace:Telerik.Windows.Controls.Gauge
Assembly:Telerik.Windows.Controls.DataVisualization.dll
Syntax:
public abstract class GraphicScale : ScaleBase
Inheritance: objectScaleBaseGraphicScale
Derived Classes:
Inherited Members
Constructors
Initializes a new instance of the GraphicScale class.
protected GraphicScale()
Fields
DistributionProperty
DependencyProperty
Identifies the Distribution dependency property.
public static readonly DependencyProperty DistributionProperty
EndTickOffsetProperty
DependencyProperty
Identifies the EndTickOffset dependency property.
public static readonly DependencyProperty EndTickOffsetProperty
EndWidthProperty
DependencyProperty
Identifies the EndWidth dependency property.
public static readonly DependencyProperty EndWidthProperty
FillProperty
DependencyProperty
Identifies the Fill dependency property.
public static readonly DependencyProperty FillProperty
IsInteractiveProperty
DependencyProperty
Identifies the IsInteractive dependency property.
public static readonly DependencyProperty IsInteractiveProperty
IsReversedProperty
DependencyProperty
Identifies the IsReversed dependency property.
public static readonly DependencyProperty IsReversedProperty
LabelFormatProperty
DependencyProperty
Identifies the LabelFormat dependency property.
public static readonly DependencyProperty LabelFormatProperty
LabelLocationProperty
DependencyProperty
Identifies the LabelLocation dependency property.
public static readonly DependencyProperty LabelLocationProperty
LabelOffsetProperty
DependencyProperty
Identifies the LabelOffset dependency property.
public static readonly DependencyProperty LabelOffsetProperty
LabelTemplateProperty
DependencyProperty
Identifies the LabelTemplate dependency property.
public static readonly DependencyProperty LabelTemplateProperty
LabelTooltipFormatProperty
DependencyProperty
Identifies the LabelTooltipFormat dependency property.
public static readonly DependencyProperty LabelTooltipFormatProperty
LabelToolTipStyleProperty
DependencyProperty
Identifies the LabelToolTipStyle dependency property.
public static readonly DependencyProperty LabelToolTipStyleProperty
LabelToolTipTemplateProperty
DependencyProperty
Identifies the LabelToolTipTemplate dependency property.
public static readonly DependencyProperty LabelToolTipTemplateProperty
LabelUseRangeColorProperty
DependencyProperty
Identifies the LabelUseRangeColor dependency property.
public static readonly DependencyProperty LabelUseRangeColorProperty
MajorTickBackgroundProperty
DependencyProperty
Identifies the MajorTickBackground dependency property.
public static readonly DependencyProperty MajorTickBackgroundProperty
MajorTickListProperty
DependencyProperty
Identifies the MajorTickList dependency property.
public static readonly DependencyProperty MajorTickListProperty
MajorTickLocationProperty
DependencyProperty
Identifies the MajorTickLocation dependency property.
public static readonly DependencyProperty MajorTickLocationProperty
MajorTickOffsetProperty
DependencyProperty
Identifies the MajorTickOffset dependency property.
public static readonly DependencyProperty MajorTickOffsetProperty
MajorTickRelativeHeightProperty
DependencyProperty
Identifies the MajorTickRelativeHeight dependency property.
public static readonly DependencyProperty MajorTickRelativeHeightProperty
MajorTickRelativeWidthProperty
DependencyProperty
Identifies the MajorTickRelativeWidth dependency property.
public static readonly DependencyProperty MajorTickRelativeWidthProperty
MajorTicksProperty
DependencyProperty
Identifies the MajorTicks dependency property.
public static readonly DependencyProperty MajorTicksProperty
MajorTickStepProperty
DependencyProperty
Identifies the MajorTickStep dependency property.
public static readonly DependencyProperty MajorTickStepProperty
MajorTickStrokeProperty
DependencyProperty
Identifies the MajorTickStroke dependency property.
public static readonly DependencyProperty MajorTickStrokeProperty
MajorTickStrokeThicknessProperty
DependencyProperty
Identifies the MajorTickStrokeThickness dependency property.
public static readonly DependencyProperty MajorTickStrokeThicknessProperty
MajorTickTemplateProperty
DependencyProperty
Identifies the MajorTickTemplate dependency property.
public static readonly DependencyProperty MajorTickTemplateProperty
MajorTickTooltipFormatProperty
DependencyProperty
Identifies the MajorTickTooltipFormat dependency property.
public static readonly DependencyProperty MajorTickTooltipFormatProperty
MajorTickToolTipStyleProperty
DependencyProperty
Identifies the MajorTickToolTipStyle dependency property.
public static readonly DependencyProperty MajorTickToolTipStyleProperty
MajorTickToolTipTemplateProperty
DependencyProperty
Identifies the MajorTickToolTipTemplate dependency property.
public static readonly DependencyProperty MajorTickToolTipTemplateProperty
MajorTickUseRangeColorProperty
DependencyProperty
Identifies the MajorTickUseRangeColor dependency property.
public static readonly DependencyProperty MajorTickUseRangeColorProperty
MiddleTickBackgroundProperty
DependencyProperty
Identifies the MiddleTickBackground dependency property.
public static readonly DependencyProperty MiddleTickBackgroundProperty
MiddleTickLocationProperty
DependencyProperty
Identifies the MiddleTickLocation dependency property.
public static readonly DependencyProperty MiddleTickLocationProperty
MiddleTickOffsetProperty
DependencyProperty
Identifies the MiddleTickOffset dependency property.
public static readonly DependencyProperty MiddleTickOffsetProperty
MiddleTickRelativeHeightProperty
DependencyProperty
Identifies the MiddleTickRelativeHeight dependency property.
public static readonly DependencyProperty MiddleTickRelativeHeightProperty
MiddleTickRelativeWidthProperty
DependencyProperty
Identifies the MiddleTickRelativeWidth dependency property.
public static readonly DependencyProperty MiddleTickRelativeWidthProperty
MiddleTicksProperty
DependencyProperty
Identifies the MiddleTicks dependency property.
public static readonly DependencyProperty MiddleTicksProperty
MiddleTickStrokeProperty
DependencyProperty
Identifies the MiddleTickStroke dependency property.
public static readonly DependencyProperty MiddleTickStrokeProperty
MiddleTickStrokeThicknessProperty
DependencyProperty
Identifies the MiddleTickStrokeThickness dependency property.
public static readonly DependencyProperty MiddleTickStrokeThicknessProperty
MiddleTickTemplateProperty
DependencyProperty
Identifies the MiddleTickTemplate dependency property.
public static readonly DependencyProperty MiddleTickTemplateProperty
MiddleTickTooltipFormatProperty
DependencyProperty
Identifies the MiddleTickTooltipFormat dependency property.
public static readonly DependencyProperty MiddleTickTooltipFormatProperty
MiddleTickToolTipStyleProperty
DependencyProperty
Identifies the MiddleTickToolTipStyle dependency property.
public static readonly DependencyProperty MiddleTickToolTipStyleProperty
MiddleTickToolTipTemplateProperty
DependencyProperty
Identifies the MiddleTickToolTipTemplate dependency property.
public static readonly DependencyProperty MiddleTickToolTipTemplateProperty
MiddleTickUseRangeColorProperty
DependencyProperty
Identifies the MiddleTickUseRangeColor dependency property.
public static readonly DependencyProperty MiddleTickUseRangeColorProperty
MinorTickBackgroundProperty
DependencyProperty
Identifies the MinorTickBackground dependency property.
public static readonly DependencyProperty MinorTickBackgroundProperty
MinorTickLocationProperty
DependencyProperty
Identifies the MinorTickLocation dependency property.
public static readonly DependencyProperty MinorTickLocationProperty
MinorTickOffsetProperty
DependencyProperty
Identifies the MinorTickOffset dependency property.
public static readonly DependencyProperty MinorTickOffsetProperty
MinorTickRelativeHeightProperty
DependencyProperty
Identifies the MinorTickRelativeHeight dependency property.
public static readonly DependencyProperty MinorTickRelativeHeightProperty
MinorTickRelativeWidthProperty
DependencyProperty
Identifies the MinorTickRelativeWidth dependency property.
public static readonly DependencyProperty MinorTickRelativeWidthProperty
MinorTicksProperty
DependencyProperty
Identifies the MinorTicks dependency property.
public static readonly DependencyProperty MinorTicksProperty
MinorTickStrokeProperty
DependencyProperty
Identifies the MinorTickStroke dependency property.
public static readonly DependencyProperty MinorTickStrokeProperty
MinorTickStrokeThicknessProperty
DependencyProperty
Identifies the MinorTickStrokeThickness dependency property.
public static readonly DependencyProperty MinorTickStrokeThicknessProperty
MinorTickTemplateProperty
DependencyProperty
Identifies the MinorTickTemplate dependency property.
public static readonly DependencyProperty MinorTickTemplateProperty
MinorTickTooltipFormatProperty
DependencyProperty
Identifies the MinorTickTooltipFormat dependency property.
public static readonly DependencyProperty MinorTickTooltipFormatProperty
MinorTickToolTipStyleProperty
DependencyProperty
Identifies the MinorTickToolTipStyle dependency property.
public static readonly DependencyProperty MinorTickToolTipStyleProperty
MinorTickToolTipTemplateProperty
DependencyProperty
Identifies the MinorTickToolTipTemplate dependency property.
public static readonly DependencyProperty MinorTickToolTipTemplateProperty
MinorTickUseRangeColorProperty
DependencyProperty
Identifies the MinorTickUseRangeColor dependency property.
public static readonly DependencyProperty MinorTickUseRangeColorProperty
RangeLocationProperty
DependencyProperty
Identifies the RangeLocation dependency property.
public static readonly DependencyProperty RangeLocationProperty
RangeOffsetProperty
DependencyProperty
Identifies the RangeOffset dependency property.
public static readonly DependencyProperty RangeOffsetProperty
ShowFirstLabelProperty
DependencyProperty
Identifies the ShowFirstLabel dependency property.
public static readonly DependencyProperty ShowFirstLabelProperty
ShowLastLabelProperty
DependencyProperty
Identifies the ShowLastLabel dependency property.
public static readonly DependencyProperty ShowLastLabelProperty
StartTickOffsetProperty
DependencyProperty
Identifies the StartTickOffset dependency property.
public static readonly DependencyProperty StartTickOffsetProperty
StartWidthProperty
DependencyProperty
Identifies the StartWidth dependency property.
public static readonly DependencyProperty StartWidthProperty
StrokeProperty
DependencyProperty
Identifies the Stroke dependency property.
public static readonly DependencyProperty StrokeProperty
StrokeThicknessProperty
DependencyProperty
Identifies the StrokeThickness dependency property.
public static readonly DependencyProperty StrokeThicknessProperty
TickRangeGroupProperty
DependencyProperty
Identifies the TickRangeGroup dependency property.
public static readonly DependencyProperty TickRangeGroupProperty
Properties
Gets or sets the scale's value distribution.
public IValueDistribution Distribution { get; set; }
Gets or sets the offset of the last major tick on the scale from scale's maximal value.
[SRCategory("Scale")]
public double EndTickOffset { get; set; }
Value at the last major tick mark on the scale.
protected double EndValue { get; set; }
Gets or sets the end width of the scale bar.
[SRCategory("Layout")]
public double EndWidth { get; set; }
Fill
Brush
Gets or sets the fill of the scale path.
[SRCategory("Layout")]
public Brush Fill { get; set; }
Gets or sets value that indicates whether the scale's interactive features are enabled.
public bool IsInteractive { get; set; }
Gets or sets value that indicates whether the scale should be shown in the reverse mode.
[SRCategory("Scale")]
public bool IsReversed { get; set; }
Gets or sets the tick label format.
[SRCategory("Scale")]
public string LabelFormat { get; set; }
Gets or sets the tick label location.
[SRCategory("Scale")]
public ScaleObjectLocation LabelLocation { get; set; }
Gets or sets the tick label offset.
[SRCategory("Scale")]
public GaugeMeasure LabelOffset { get; set; }
LabelTemplate
DataTemplate
Gets or sets the tick label data template.
[SRCategory("Scale")]
public DataTemplate LabelTemplate { get; set; }
Gets or sets the format of the label tooltip.
public string LabelTooltipFormat { get; set; }
The format string can use properties of the scale objects. For example "{Value|F2} Range: Min={Range.Min|F2} Max={Range.Max|F2}". This format string uses value of the indicator and Min and Max properties of the gauge range this indicator is pointing to. Currently you can use Range and Scale objects in the format string. The '|' character is used to separate property name and its output format.
LabelToolTipStyle
Style
Gets or sets the style applied to the toolTip of the label.
public Style LabelToolTipStyle { get; set; }
LabelToolTipTemplate
DataTemplate
Gets or sets the template of the label tooltip.
public DataTemplate LabelToolTipTemplate { get; set; }
Gets or sets value which indicates whether the tick label will use range color as its background.
[SRCategory("Scale")]
public bool LabelUseRangeColor { get; set; }
MajorTickBackground
Brush
Gets or sets the major tick background.
[SRCategory("Scale")]
public Brush MajorTickBackground { get; set; }
Gets or sets a list of doubles which specify positions of the major ticks.
[SRCategory("Scale")]
public IEnumerable<double> MajorTickList { get; set; }
Gets or sets location of the major tick.
[SRCategory("Scale")]
public ScaleObjectLocation MajorTickLocation { get; set; }
Gets or sets offset the major tick.
[SRCategory("Scale")]
public GaugeMeasure MajorTickOffset { get; set; }
Gets or sets the relative height of the major tick.
[SRCategory("Scale")]
public GaugeMeasure MajorTickRelativeHeight { get; set; }
Gets or sets the relative width of the major tick.
[SRCategory("Scale")]
public GaugeMeasure MajorTickRelativeWidth { get; set; }
Gets or sets number of the major ticks along the scale.
[SRCategory("Scale")]
public int MajorTicks { get; set; }
Calculate number of the major tick marks using this.MajorTicks, this.MajorTickStep and this.ShowLastLabel property.
protected int MajorTicksCount { get; }
Gets or sets the interval between major ticks.
[SRCategory("Scale")]
public double MajorTickStep { get; set; }
MajorTickStroke
Brush
Gets or sets the major tick stroke.
[SRCategory("Scale")]
public Brush MajorTickStroke { get; set; }
Gets or sets the major tick stroke thickness.
[SRCategory("Scale")]
public double MajorTickStrokeThickness { get; set; }
MajorTickTemplate
DataTemplate
Gets or sets the major tick data template.
[SRCategory("Scale")]
public DataTemplate MajorTickTemplate { get; set; }
Gets or sets format of the major tick mark tooltip.
public string MajorTickTooltipFormat { get; set; }
The format string can use properties of the scale objects. For example "{Value|F2} Range: Min={Range.Min|F2} Max={Range.Max|F2}". This format string uses value of the indicator and Min and Max properties of the gauge range this indicator is pointing to. Currently you can use Range and Scale objects in the format string. The '|' character is used to separate property name and its output format.
Gets or sets the style applied to the toolTip of the major tick mark.
public Style MajorTickToolTipStyle { get; set; }
MajorTickToolTipTemplate
DataTemplate
Gets or sets the template of the major tick mark tooltip.
public DataTemplate MajorTickToolTipTemplate { get; set; }
Gets or sets value which indicates whether the major tick will use range color as its background.
[SRCategory("Scale")]
public bool MajorTickUseRangeColor { get; set; }
MiddleTickBackground
Brush
Gets or sets the background of the middle tick.
[SRCategory("Scale")]
public Brush MiddleTickBackground { get; set; }
Gets or sets location of the middle tick.
[SRCategory("Scale")]
public ScaleObjectLocation MiddleTickLocation { get; set; }
Gets or sets offset of the middle tick.
[SRCategory("Scale")]
public GaugeMeasure MiddleTickOffset { get; set; }
Gets or sets the relative height of the middle tick.
[SRCategory("Scale")]
public GaugeMeasure MiddleTickRelativeHeight { get; set; }
Gets or sets the relative width of the middle tick.
[SRCategory("Scale")]
public GaugeMeasure MiddleTickRelativeWidth { get; set; }
Gets or sets number of the middle ticks per one major tick.
[SRCategory("Scale")]
public int MiddleTicks { get; set; }
MiddleTickStroke
Brush
Gets or sets stroke of the middle tick.
[SRCategory("Scale")]
public Brush MiddleTickStroke { get; set; }
Gets or sets stroke thickness of the middle tick.
[SRCategory("Scale")]
public double MiddleTickStrokeThickness { get; set; }
MiddleTickTemplate
DataTemplate
Gets or sets the data template of the middle tick.
[SRCategory("Scale")]
public DataTemplate MiddleTickTemplate { get; set; }
Gets or sets format of the middle tick mark tooltip.
public string MiddleTickTooltipFormat { get; set; }
The format string can use properties of the scale objects. For example "{Value|F2} Range: Min={Range.Min|F2} Max={Range.Max|F2}". This format string uses value of the indicator and Min and Max properties of the gauge range this indicator is pointing to. Currently you can use Range and Scale objects in the format string. The '|' character is used to separate property name and its output format.
Gets or sets the style applied to the toolTip of the middle tick mark.
public Style MiddleTickToolTipStyle { get; set; }
MiddleTickToolTipTemplate
DataTemplate
Gets or sets template of the middle tick mark tooltip.
public DataTemplate MiddleTickToolTipTemplate { get; set; }
Gets or sets value which indicates whether the middle tick will use the range color as its background.
[SRCategory("Scale")]
public bool MiddleTickUseRangeColor { get; set; }
MinorTickBackground
Brush
Gets or sets the background of the minor tick.
[SRCategory("Scale")]
public Brush MinorTickBackground { get; set; }
Gets or sets the location of the minor tick.
[SRCategory("Scale")]
public ScaleObjectLocation MinorTickLocation { get; set; }
Gets or sets offset of the minor tick.
[SRCategory("Scale")]
public GaugeMeasure MinorTickOffset { get; set; }
Gets or sets the relative height of the minor tick.
[SRCategory("Scale")]
public GaugeMeasure MinorTickRelativeHeight { get; set; }
Gets or sets the relative width of the minor tick.
[SRCategory("Scale")]
public GaugeMeasure MinorTickRelativeWidth { get; set; }
Gets or sets number of the minor ticks per one middle tick.
[SRCategory("Scale")]
public int MinorTicks { get; set; }
MinorTickStroke
Brush
Gets or sets stroke of the minor tick.
[SRCategory("Scale")]
public Brush MinorTickStroke { get; set; }
Gets or sets stroke thickness of the minor tick.
[SRCategory("Scale")]
public double MinorTickStrokeThickness { get; set; }
MinorTickTemplate
DataTemplate
Gets or sets the data template of the minor tick.
[SRCategory("Scale")]
public DataTemplate MinorTickTemplate { get; set; }
Gets or sets the format of the minor tick mark tooltip.
public string MinorTickTooltipFormat { get; set; }
The format string can use properties of the scale objects. For example "{Value|F2} Range: Min={Range.Min|F2} Max={Range.Max|F2}". This format string uses value of the indicator and Min and Max properties of the gauge range this indicator is pointing to. Currently you can use Range and Scale objects in the format string. The '|' character is used to separate property name and its output format.
Gets or sets the style applied to the toolTip of the minor tick mark.
public Style MinorTickToolTipStyle { get; set; }
MinorTickToolTipTemplate
DataTemplate
Gets or sets template of the minor tick mark tooltip.
public DataTemplate MinorTickToolTipTemplate { get; set; }
Gets or sets value which indicates whether the minor tick will use range color as its background.
[SRCategory("Scale")]
public bool MinorTickUseRangeColor { get; set; }
Gets or sets the default range location.
[SRCategory("Scale")]
public ScaleObjectLocation RangeLocation { get; set; }
Gets or sets default range offset.
[SRCategory("Scale")]
public GaugeMeasure RangeOffset { get; set; }
Gets or sets value that indicates whether the first tick and its label should be shown.
[SRCategory("Scale")]
public bool ShowFirstLabel { get; set; }
Gets or sets value that indicates whether the last tick and its label should be shown.
[SRCategory("Scale")]
public bool ShowLastLabel { get; set; }
Gets or sets the offset of the first major tick on the scale from scale's minimal value.
[SRCategory("Scale")]
public double StartTickOffset { get; set; }
Value at the first major tick mark on the scale.
protected double StartValue { get; set; }
Gets or sets the start width of the scale bar.
[SRCategory("Layout")]
public double StartWidth { get; set; }
Stroke
Brush
Gets or sets the Brush that specifies how the scale bar outline is painted.
[SRCategory("Layout")]
public Brush Stroke { get; set; }
Gets or sets gets or sets stroke thickness of the scale bar.
[SRCategory("Layout")]
public double StrokeThickness { get; set; }
Gets or sets range group which will be used with tick list.
public GaugeRangeGroup TickRangeGroup { get; set; }
Returns true when the MajorTickList property should be used.
protected bool UseTickList { get; }
Returns true when the MajorTickStep property should be used.
protected bool UseTickSteps { get; }
Methods
Called to arrange and size the content of a scale.
protected override Size ArrangeOverride(Size finalSize)
The computed size that is used to arrange the content.
Returns:Size
The size of the scale.
Overrides:
Undoes the effects of the PrepareContainerForItemOverride method.
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
The container element.
itemobjectThe item.
Overrides:
Gets the value which corresponds to the point on scale.
public abstract double GetValueByPoint(Point point)
Point on the scale to get value for.
Returns:Double value corresponds to the given point.
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)
The maximum size that the method can return.
Returns:Size
The size of the control, up to the maximum specified by constraint.
Overrides:
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate.
public override void OnApplyTemplate()
Overrides:
Prepares object for the container.
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Element.
itemobjectItem.
Occurs when size of the content presenter is changed.
protected override void PresenterSizeChanged(object sender, SizeChangedEventArgs e)
Sender.
eSizeChangedEventArgsEvent args.
Overrides:
Notifies that the element is changed.
protected override void ScaleObjectChanged(FrameworkElement element)
Element.
Overrides:
Update geometry of the scale bar.
protected abstract void UpdateScaleBar()
Update tick and label lists.
protected override void UpdateTicksAndLabels()
Overrides: