WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class LinearGauge

    Show / Hide Table of Contents

    Class LinearGauge

    Represents the LinearGauge UI element.

    Inheritance
    System.Object
    GaugeBase
    LinearGauge
    Implements
    System.IDisposable
    Inherited Members
    GaugeBase.StateIndicatorStyleProperty
    GaugeBase.ApplyFrameStylesProperty
    GaugeBase.CenterFrameFillColorProperty
    GaugeBase.CornerRadiusProperty
    GaugeBase.FirstFrameFillColorProperty
    GaugeBase.FirstFrameStyleProperty
    GaugeBase.FirstFrameThicknessProperty
    GaugeBase.InnerFrameContentProperty
    GaugeBase.InnerFrameStyleProperty
    GaugeBase.SecondFrameFillColorProperty
    GaugeBase.SecondFrameStyleProperty
    GaugeBase.SecondFrameThicknessProperty
    GaugeBase.SizeToContainerProperty
    GaugeBase.IsColorMergeWithBaseProperty
    GaugeBase.EnableEffectsProperty
    GaugeBase.ArrangeOverride(Size)
    GaugeBase.OnMouseWheel(MouseWheelEventArgs)
    GaugeBase.OnRender(DrawingContext)
    GaugeBase.ChildLocationChanged(DependencyObject, DependencyPropertyChangedEventArgs)
    GaugeBase.RefreshBorders()
    GaugeBase.ConvertLocation(Point, Double, Double)
    GaugeBase.ConvertLocation(Point)
    GaugeBase.GaugeBaseLoaded(Object, RoutedEventArgs)
    GaugeBase.OnAdornerStyleChanged(DependencyPropertyChangedEventArgs)
    GaugeBase.OnApplyFrameStylesChanged(DependencyPropertyChangedEventArgs)
    GaugeBase.OnFirstFrameThicknessChanged(DependencyPropertyChangedEventArgs)
    GaugeBase.OnSecondFrameThicknessChanged(DependencyPropertyChangedEventArgs)
    GaugeBase.OnInnerFrameContentChanged(DependencyPropertyChangedEventArgs)
    GaugeBase.OnIsColorMergeWithBaseChanged(DependencyPropertyChangedEventArgs)
    GaugeBase.OnEnableEffectsChanged(DependencyPropertyChangedEventArgs)
    GaugeBase.GaugeAdorner
    GaugeBase.CustomLabels
    GaugeBase.Images
    GaugeBase.StateIndicators
    GaugeBase.StateIndicatorStyle
    GaugeBase.ApplyFrameStyles
    GaugeBase.CenterFrameFillColor
    GaugeBase.CornerRadius
    GaugeBase.FirstFrameFillColor
    GaugeBase.FirstFrameStyle
    GaugeBase.FirstFrameThickness
    GaugeBase.InnerFrameContent
    GaugeBase.InnerFrameStyle
    GaugeBase.SecondFrameFillColor
    GaugeBase.SecondFrameStyle
    GaugeBase.SecondFrameThickness
    GaugeBase.SizeToContainer
    GaugeBase.IsColorMergeWithBase
    GaugeBase.EnableEffects
    GaugeBase.AdornerStyleChanged
    GaugeBase.ApplyFrameStylesChanged
    GaugeBase.FirstFrameThicknessChanged
    GaugeBase.SecondFrameThicknessChanged
    GaugeBase.IsColorMergeWithBaseChanged
    GaugeBase.EnableEffectsChanged
    Namespace: Syncfusion.Windows.Gauge
    Assembly: Syncfusion.Gauge.WPF.dll
    Syntax
    [SkinType(SkinVisualStyle = Skin.Office2007Silver, Type = typeof(LinearGauge), XamlResource = "/Syncfusion.Gauge.WPF;component/Themes/Office2007SilverStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Blend, Type = typeof(LinearGauge), XamlResource = "/Syncfusion.Gauge.WPF;component/Themes/BlendStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.VS2010, Type = typeof(CircularGauge), XamlResource = "/Syncfusion.Gauge.WPF;component/Themes/VS2010Style.xaml")]
    [SkinType(SkinVisualStyle = Skin.Default, Type = typeof(LinearGauge), XamlResource = "/Syncfusion.Gauge.WPF;component/Themes/DefaultStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Metro, Type = typeof(LinearGauge), XamlResource = "/Syncfusion.Gauge.WPF;component/Themes/MetroStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2007Blue, Type = typeof(LinearGauge), XamlResource = "/Syncfusion.Gauge.WPF;component/Themes/Office2007BlueStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2007Black, Type = typeof(LinearGauge), XamlResource = "/Syncfusion.Gauge.WPF;component/Themes/Office2007BlackStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2003, Type = typeof(LinearGauge), XamlResource = "/Syncfusion.Gauge.WPF;component/Themes/Office2003Style.xaml")]
    public class LinearGauge : GaugeBase, IDisposable
    Remarks

    The Linear Gauge is perfect for showing input values graphically along a linear scale. A linear gauge can have multiple scales, pointers, ranges, state indicators, labels and images. It has a bounded rectangle around it. The top-left corner of the rectangle has coordinates of (0, 0) and the bottom-right corner has coordinates of (100, 100) and every gauge element is drawn inside the bounded rectangle according to the Location property.

    Constructors

    LinearGauge()

    Initializes a new instance of the LinearGauge class.

    Declaration
    public LinearGauge()

    Fields

    AutoSizeProperty

    Identifies the Orientation dependency property.

    Declaration
    public static readonly DependencyProperty AutoSizeProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    FrameTypeProperty

    Identifies the FrameType dependency property.

    Declaration
    public static readonly DependencyProperty FrameTypeProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    OrientationProperty

    Identifies the Orientation dependency property.

    Declaration
    public static readonly DependencyProperty OrientationProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    Properties

    AutoSize

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

    Declaration
    public bool AutoSize { get; set; }
    Property Value
    Type Description
    System.Boolean

    Type: GaugeOrientation Default value is GaugeOrientation.Horizontal.

    FrameType

    Gets or sets the Linear Gauge frame style. This is a dependency property.

    Declaration
    public LinearGaugeFrameType FrameType { get; set; }
    Property Value
    Type Description
    LinearGaugeFrameType

    Type: GaugeFrameType

    Orientation

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

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

    Type: GaugeOrientation Default value is GaugeOrientation.Horizontal.

    Scales

    Gets or sets the collection of linear scales.

    Declaration
    public LinearScaleCollection Scales { get; set; }
    Property Value
    Type Description
    LinearScaleCollection

    Type: ScaleCollection

    Methods

    CollectionChanged(Object, NotifyCollectionChangedEventArgs)

    Occurs when an item is added, removed, changed, moved, or the entire collection is refreshed.

    Declaration
    protected override void CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    System.Collections.Specialized.NotifyCollectionChangedEventArgs e

    The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data.

    Overrides
    GaugeBase.CollectionChanged(Object, NotifyCollectionChangedEventArgs)

    Dispose()

    Declaration
    public void Dispose()

    LinearGaugeLoaded(Object, RoutedEventArgs)

    Invoked when the control is ready for presentation.

    Declaration
    protected virtual void LinearGaugeLoaded(object sender, RoutedEventArgs e)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    System.Windows.RoutedEventArgs e

    The System.Windows.RoutedEventArgs that contains the event data.

    OnApplyTemplate()

    Called when the templates are being applied.

    Declaration
    public override void OnApplyTemplate()
    Overrides
    GaugeBase.OnApplyTemplate()
    Remarks

    All the borders,Location and Orientation were set. If the PART_ContainerBorder is not set, then the Adorned Element(the element underneath the adorner layer)

    is LinearGauge. If the PART_ContainerBorder is set, then the Adorned Element is

    the PART_ContainerBorder

    OnAutoSizeChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises OrientationChanged event.

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

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

    OnFrameTypeChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises FrameTypeChanged event.

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

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

    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.

    Overrides
    GaugeBase.OnInitialized(EventArgs)

    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.

    OnRenderSizeChanged(SizeChangedInfo)

    Raises the System.Windows.FrameworkElement.SizeChanged event, using the specified information as part of the eventual event data.

    Declaration
    protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
    Parameters
    Type Name Description
    System.Windows.SizeChangedInfo sizeInfo

    Details of the old and new size involved in the change.

    Overrides
    GaugeBase.OnRenderSizeChanged(SizeChangedInfo)

    OnRotationAngleChanged(DependencyPropertyChangedEventArgs)

    Updates property value cache and raises RotationAngleChanged event.

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

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

    RefreshAdornerLayer()

    Refreshes the adorner layer.

    Declaration
    protected override void RefreshAdornerLayer()
    Overrides
    GaugeBase.RefreshAdornerLayer()

    UpdateChildrenLocation()

    Updates the location of children elements.

    Declaration
    protected override void UpdateChildrenLocation()
    Overrides
    GaugeBase.UpdateChildrenLocation()

    Events

    AutoSizeChanged

    Event that is raised when AutoSize property is changed.

    Declaration
    public event PropertyChangedCallback AutoSizeChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    FrameTypeChanged

    Event that is raised when FrameType property is changed.

    Declaration
    public event PropertyChangedCallback FrameTypeChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    OrientationChanged

    Event that is raised when Orientation property is changed.

    Declaration
    public event PropertyChangedCallback OrientationChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    RotationAngleChanged

    Event that is raised when Syncfusion.Windows.Gauge.LinearGauge.RotationAngle property is changed.

    Declaration
    public event PropertyChangedCallback RotationAngleChanged
    Event Type
    Type Description
    System.Windows.PropertyChangedCallback

    Implements

    System.IDisposable

    See Also

    CircularGauge
    DigitalGauge
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved