menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class LinearScale - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class LinearScale

    Represents the scale visual element.

    Inheritance
    System.Object
    GaugeElement
    LocalizableGaugeElement
    ScaleBase
    LinearScale
    Implements
    System.IDisposable
    Inherited Members
    GaugeElement.BackgroundBrush
    GaugeElement.BackgroundBrushProperty
    GaugeElement.BorderBrush
    GaugeElement.BorderBrushProperty
    GaugeElement.BorderWidth
    GaugeElement.BorderWidthProperty
    LocalizableGaugeElement.Location
    LocalizableGaugeElement.LocationChanged
    LocalizableGaugeElement.LocationProperty
    LocalizableGaugeElement.OnLocationChanged(DependencyPropertyChangedEventArgs)
    ScaleBase.CoerceMaximum(DependencyObject, Object)
    ScaleBase.CoerceMaximum(Object)
    ScaleBase.CoerceMinimum(DependencyObject, Object)
    ScaleBase.CoerceMinimum(Object)
    ScaleBase.CoerceScaleBarSize(DependencyObject, Object)
    ScaleBase.CoerceScaleBarSize(Object)
    ScaleBase.IsNumberDivision
    ScaleBase.IsNumberDivisionProperty
    ScaleBase.MajorIntervalValue
    ScaleBase.MajorIntervalValueChanged
    ScaleBase.MajorIntervalValueProperty
    ScaleBase.Maximum
    ScaleBase.MaximumChanged
    ScaleBase.MaximumProperty
    ScaleBase.Minimum
    ScaleBase.MinimumChanged
    ScaleBase.MinimumProperty
    ScaleBase.MinorIntervalValue
    ScaleBase.MinorIntervalValueChanged
    ScaleBase.MinorIntervalValueProperty
    ScaleBase.NumberMajorDivision
    ScaleBase.NumberMajorDivisionProperty
    ScaleBase.NumberMinorDivision
    ScaleBase.NumberMinorDivisionProperty
    ScaleBase.OnMajorIntervalValueChanged(DependencyPropertyChangedEventArgs)
    ScaleBase.OnMinorIntervalValueChanged(DependencyPropertyChangedEventArgs)
    ScaleBase.OnScaleBarSizeChanged(DependencyPropertyChangedEventArgs)
    ScaleBase.OnShadowOffsetChanged(DependencyPropertyChangedEventArgs)
    ScaleBase.Ranges
    ScaleBase.ScaleBarSize
    ScaleBase.ScaleBarSizeChanged
    ScaleBase.ScaleBarSizeProperty
    ScaleBase.ScaleDirection
    ScaleBase.ScaleDirectionChanged
    ScaleBase.ScaleDirectionProperty
    ScaleBase.ShadowOffset
    ScaleBase.ShadowOffsetChanged
    ScaleBase.ShadowOffsetProperty
    ScaleBase.Ticks
    Namespace: Syncfusion.Windows.Gauge
    Assembly: Syncfusion.Gauge.WPF.dll
    Syntax
    public class LinearScale : ScaleBase, IDisposable
    Remarks

    The LinearScale is the System.Windows.Media.Visual.VisualParent for the various elements of the Gauge, such as LinearLabelTick, LinearMarkTick, LinearRange, LinearBarPointer and LinearMarkerPointer.

    Examples
    
    
    
    
    
    
    
    
    
    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows;
    using System.Windows.Media;
    using System.Windows.Controls;
    using System.Windows.Data;
    using Syncfusion.Windows.Shared;
    using Syncfusion.Windows.Gauge;

    namespace LinearScaleSample { public partial class Window1 : Window { private LinearGauge linearGauge1;

    public Window1() { InitializeComponent();

    linearGauge1 = new LinearGauge(); this.linearGauge1.CenterFrameFillColor = Colors.Brown;

    LinearScale scale = new LinearScale(); scale.Minimum = 0; scale.Maximum = 100; scale.MinorIntervalValue = 2; scale.MajorIntervalValue = 10; scale.ScaleBarSize = 20; scale.ScaleBarLength = 260; linearGauge1.Scales.Add(scale);

    this.Content = linearGauge1; } } }

    Constructors

    LinearScale()

    Initializes a new instance of the LinearScale class.

    Declaration
    public LinearScale()

    Fields

    OrientationProperty

    Identifies the Orientation dependency property.

    Declaration
    protected static readonly DependencyProperty OrientationProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    RadiusXProperty

    Identifies the RadiusX dependency property.

    Declaration
    public static readonly DependencyProperty RadiusXProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    RadiusYProperty

    Identifies the RadiusY dependency property.

    Declaration
    public static readonly DependencyProperty RadiusYProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ScaleBarLengthProperty

    Identifies the ScaleBarLength dependency property.

    Declaration
    public static readonly DependencyProperty ScaleBarLengthProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ScaleCustomGeometryProperty

    Identifies the ScaleCustomGeometryProperty dependency property.

    Declaration
    public static readonly DependencyProperty ScaleCustomGeometryProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ScaleStyleProperty

    Identifies the ScaleStyleProperty dependency property.

    Declaration
    public static readonly DependencyProperty ScaleStyleProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    Properties

    Orientation

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

    Declaration
    protected GaugeOrientation Orientation { get; set; }
    Property Value
    Type Description
    GaugeOrientation

    Type: GaugeOrientation Default value is GaugeOrientation.Horizontal.

    Pointers

    Gets or sets the collection of linear pointers.

    Declaration
    public LinearPointersCollection Pointers { get; set; }
    Property Value
    Type Description
    LinearPointersCollection

    Type: LinearPointersCollection

    RadiusX

    Gets or sets the corner radius(RadiusX) for Rounded Rectangle Scale. This is a dependency property.

    Declaration
    public double RadiusX { get; set; }
    Property Value
    Type Description
    System.Double

    Type: System.Double Default value is 0d.

    See Also
    RadiusY

    RadiusY

    Gets or sets the corner radius(RadiusY) for Rounded Rectangle Scale. This is a dependency property.

    Declaration
    public double RadiusY { get; set; }
    Property Value
    Type Description
    System.Double

    Type: System.Double Default value is 0d.

    See Also
    RadiusX

    ScaleBarLength

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

    Declaration
    public double ScaleBarLength { get; set; }
    Property Value
    Type Description
    System.Double

    Type: System.Double Default value is 0.

    See Also
    ScaleBarSize

    ScaleCustomGeometry

    Gets or sets a custom geometry for the Scale bar. This is a dependency property.

    Declaration
    public Geometry ScaleCustomGeometry { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Geometry

    Type: System.Windows.Media.Geometry Default value is null.

    ScaleStyle

    Gets or sets the linear scale style. This is a dependency property.

    Declaration
    public LinearScaleStyle ScaleStyle { get; set; }
    Property Value
    Type Description
    LinearScaleStyle

    Type: LinearScaleStyle Default value is Rectangle.

    VisualChildrenCount

    Gets the number of visual child elements within this element.

    Declaration
    protected override int VisualChildrenCount { get; }
    Property Value
    Type Description
    System.Int32

    Type: System.Int32 Returns the Visual Children count.

    Methods

    ArrangeOverride(Size)

    Positions child elements and determines a size for the element.

    Declaration
    protected override Size ArrangeOverride(Size finalSize)
    Parameters
    Type Name Description
    System.Windows.Size finalSize

    The final area within the parent that this element should use to arrange itself and its children.

    Returns
    Type Description
    System.Windows.Size

    The actual size used.

    Remarks

    Linear Scale provides all of its child elements with rectangular space of their DesiredWidth and DesiredHeight,which starts exactly at the center of the LinearScale. All of its children render themselves at the appropriate positions by using transforms.

    Dispose()

    Declaration
    public void Dispose()

    GetVisualChild(Int32)

    Returns a child at the specified index from a collection of child elements.

    Declaration
    protected override Visual GetVisualChild(int index)
    Parameters
    Type Name Description
    System.Int32 index

    he zero-based index of the requested child element in the collection.

    Returns
    Type Description
    System.Windows.Media.Visual

    The requested child element.

    Remarks

    The arrangement is in such a way that Ranges are arranged first, then the Ticks(i.e above the Ranges) and then the Pointers(i.e above the Ticks and ranges) and hence the pointer are always at the top

    MeasureOverride(Size)

    Measures the size in layout required for child elements and determines a size for the element.

    Declaration
    protected override Size MeasureOverride(Size availableSize)
    Parameters
    Type Name Description
    System.Windows.Size availableSize

    The available size that this element can give to child elements.

    Returns
    Type Description
    System.Windows.Size

    The size that this element determines it needs during layout.

    OnInitialized(EventArgs)

    Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized property is set to true internally.

    Declaration
    protected override void OnInitialized(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The System.EventArgs that contains the event data.

    OnMaximumChanged(DependencyPropertyChangedEventArgs)

    Invoked when Maximum property is changed.

    Declaration
    protected override void OnMaximumChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    Overrides
    ScaleBase.OnMaximumChanged(DependencyPropertyChangedEventArgs)

    OnMinimumChanged(DependencyPropertyChangedEventArgs)

    Invoked when Minimum property is changed.

    Declaration
    protected override void OnMinimumChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    Overrides
    ScaleBase.OnMinimumChanged(DependencyPropertyChangedEventArgs)

    OnOrientationChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises OrientationChanged event.

    Declaration
    protected virtual void OnOrientationChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnRender(DrawingContext)

    Participates in rendering operations that are directed by the layout system.

    Declaration
    protected override void OnRender(DrawingContext drawingContext)
    Parameters
    Type Name Description
    System.Windows.Media.DrawingContext drawingContext

    The drawing instructions for a specific element.

    OnScaleBarLengthChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises ScaleBarLengthChanged event.

    Declaration
    protected virtual void OnScaleBarLengthChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnScaleCustomGeometryChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises OnScaleCustomGeometryChanged event.

    Declaration
    protected virtual void OnScaleCustomGeometryChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    OnScaleDirectionChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises OnScaleDirectionChanged event.

    Declaration
    protected override void OnScaleDirectionChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    Overrides
    ScaleBase.OnScaleDirectionChanged(DependencyPropertyChangedEventArgs)

    OnScaleStyleChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises OnScaleStyleChanged event.

    Declaration
    protected virtual void OnScaleStyleChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    Property change details, such as old value and new value.

    Events

    OrientationChanged

    Event that is raised when Orientation property is changed.

    Declaration
    protected event PropertyChangedCallback OrientationChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    ScaleBarLengthChanged

    Event that is raised when ScaleBarLength property is changed.

    Declaration
    public event PropertyChangedCallback ScaleBarLengthChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    ScaleCustomGeometryChanged

    Event that is raised when ScaleCustomGeometry property is changed.

    Declaration
    public event PropertyChangedCallback ScaleCustomGeometryChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    ScaleStyleChanged

    Event that is raised when ScaleStyle property is changed.

    Declaration
    public event PropertyChangedCallback ScaleStyleChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved