Syncfusion.Gauge.WPF
Members  Example 


LinearGauge Class

Represents the LinearGauge UI element.
Object Model
LinearGauge ClassCustomLabelsCollection ClassCircularCustomLabel ClassGaugeAdorner ClassImagesCollection ClassGaugeImage ClassLinearScaleCollection ClassLinearScale ClassStateIndicatorsCollection ClassStateIndicator Class
Syntax
'Declaration
 
<SkinTypeAttribute(SkinVisualStyle=Skin.Default, 
   Type=Syncfusion.Windows.Gauge.LinearGauge, 
   XamlResource="/Syncfusion.Gauge.WPF;component/Themes/DefaultStyle.xaml")>
<StyleTypedPropertyAttribute(Property="StateIndicatorStyle", StyleTargetType=Syncfusion.Windows.Gauge.StateIndicator)>
<XmlLangPropertyAttribute("Language")>
<UsableDuringInitializationAttribute(True)>
<RuntimeNamePropertyAttribute("Name")>
<UidPropertyAttribute("Uid")>
<TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
<NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
Public Class LinearGauge 
   Inherits GaugeBase
'Usage
 
Dim instance As LinearGauge
[SkinType(SkinVisualStyle=Skin.Default, 
   Type=Syncfusion.Windows.Gauge.LinearGauge, 
   XamlResource="/Syncfusion.Gauge.WPF;component/Themes/DefaultStyle.xaml")]
[StyleTypedProperty(Property="StateIndicatorStyle", StyleTargetType=Syncfusion.Windows.Gauge.StateIndicator)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public class LinearGauge : GaugeBase 
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.
Example
XAML Object Element Usage

C#
public partial class LinearGauge : Control

The following example shows how to create a LinearGauge in XAML.

The following example shows how to create a LinearGauge in C#.

public partial class LinearGauge : Control
using System;
using System.Windows;
using System.Windows.Controls;
using Syncfusion.Windows.Gauge;
using System.Windows.Media;
namespace GaugeControlTesting
{
  public partial class Window1 : Window
  {
      public Window1()
      {
          InitializeComponent();
          this.linearGauge1.CenterFrameFillColor = Colors.Brown;
          LinearScale scale = new LinearScale();
          scale.Minimum = 0;
          scale.Maximum = 100;
          scale.MinorIntervalValue = 2;
          scale.MajorIntervalValue = 10;
          scale.ScaleBarSize = 10;
          scale.ScaleBarLength = 260;
          linearGauge1.Scales.Add( scale );
          LinearLabelTick labelTick = new LinearLabelTick();
          labelTick.FontSize = 10;
          labelTick.TickStyle = TickStyle.MajorTick;
          labelTick.BackgroundBrush = new SolidColorBrush( Colors.Red );
          labelTick.TickPlacement = ScalePlacement.Inside;
          labelTick.DistanceFromScale = 5;
          scale.Ticks.Add( labelTick );
          LinearMarkTick markTick1 = new LinearMarkTick();
          markTick1.TickHeight = 9;
          markTick1.TickShape = TickShape.Rectangle;
          markTick1.TickStyle = TickStyle.MajorTick;
          markTick1.TickWidth = 4;
          markTick1.BackgroundBrush = new SolidColorBrush( Colors.Pink );
          scale.Ticks.Add( markTick1 );
          LinearMarkTick markTick2 = new LinearMarkTick();
          markTick2.TickHeight = 4;
          markTick2.TickWidth = 1;
          markTick2.TickStyle = TickStyle.MinorTick;
          markTick2.BackgroundBrush = new SolidColorBrush( Colors.White );
          scale.Ticks.Add( markTick2 );
          LinearBarPointer pointer = new LinearBarPointer();
          pointer.BackgroundBrush = new SolidColorBrush( Colors.Blue );
          pointer.BorderBrush = new SolidColorBrush( Colors.Red );
          pointer.PointerWidth = 5;
          pointer.Value = 50;
          scale.Pointers.Add( pointer );
          LinearRange range = new LinearRange();
          range.StartValue = 70;
          range.EndValue = 100;
          range.StartWidth = 0;
          range.EndWidth = 10;
          range.RangePosition = ScalePlacement.Inside;
          range.DistanceFromScale = 2;
          range.BackgroundBrush = new SolidColorBrush( Colors.OrangeRed );
      }
  }
}
Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  System.Windows.Controls.Control
                     Syncfusion.Windows.Gauge.GaugeBase
                        Syncfusion.Windows.Gauge.LinearGauge

AssemblyVersion

Syncfusion.Gauge.WPF: 17.4460.0.39

See Also