Class LinearGauge
Represents the LinearGauge UI element.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Gauge
Assembly: Syncfusion.Gauge.WPF.dll
Syntax
[SkinType(SkinVisualStyle = Skin.Office2003, Type = typeof(LinearGauge), XamlResource = "/Syncfusion.Gauge.WPF;component/Themes/Office2003Style.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2007Blue, Type = typeof(LinearGauge), XamlResource = "/Syncfusion.Gauge.WPF;component/Themes/Office2007BlueStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2007Silver, Type = typeof(LinearGauge), XamlResource = "/Syncfusion.Gauge.WPF;component/Themes/Office2007SilverStyle.xaml")]
[SkinType(SkinVisualStyle = Skin.Office2007Black, Type = typeof(LinearGauge), XamlResource = "/Syncfusion.Gauge.WPF;component/Themes/Office2007BlackStyle.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")]
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 |
|---|
| System.Windows.DependencyProperty |
FrameTypeProperty
Identifies the FrameType dependency property.
Declaration
public static readonly DependencyProperty FrameTypeProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
OrientationProperty
Identifies the Orientation dependency property.
Declaration
public static readonly DependencyProperty OrientationProperty
Field Value
| Type |
|---|
| 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
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
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
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
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
UpdateChildrenLocation()
Updates the location of children elements.
Declaration
protected override void UpdateChildrenLocation()
Overrides
Events
AutoSizeChanged
Event that is raised when AutoSize property is changed.
Declaration
public event PropertyChangedCallback AutoSizeChanged
Event Type
| Type |
|---|
| System.Windows.PropertyChangedCallback |
FrameTypeChanged
Event that is raised when FrameType property is changed.
Declaration
public event PropertyChangedCallback FrameTypeChanged
Event Type
| Type |
|---|
| System.Windows.PropertyChangedCallback |
OrientationChanged
Event that is raised when Orientation property is changed.
Declaration
public event PropertyChangedCallback OrientationChanged
Event Type
| Type |
|---|
| 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 |
|---|
| System.Windows.PropertyChangedCallback |