Syncfusion.Gauge.WPF
Members  Example 


Syncfusion.Windows.Gauge Namespace : StateIndicator Class

StateIndicator Class

Represents the gauge visual element that has the ability to indicate the state of the Gauge, by turning itself "on" when the pointer reaches a stated range and vice versa.
Object Model
StateIndicator ClassStateRangeCollection ClassStateRange Class
Syntax
'Declaration
 
<StyleTypedPropertyAttribute(Property="ScaleStyle", 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 StateIndicator 
   Inherits LocalizableGaugeElement
'Usage
 
Dim instance As StateIndicator
[StyleTypedProperty(Property="ScaleStyle", 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 StateIndicator : LocalizableGaugeElement 
Remarks
Inorder to make the StateIndicator work property, the StateRange values should be properly initialized and the ActiveBackgroundBrush should be set to a different color other than the range's BackgroundBrush color inorder to make the StateIndicator's state change visible.
Example
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Media;
using System.Windows.Controls;
using Syncfusion.Windows.Shared;
using Syncfusion.Windows.Gauge;
namespace WpfApplication5
{
    public partial class Window1 : Window
    {
        private CircularScale m_scale;
        private StateIndicator m_indicator;
        private CircularGauge m_gauge;
        public Window1()
        {
            InitializeComponent();
            m_scale = new CircularScale();
            m_gauge = new CircularGauge();
            m_scale.ShadowOffset = 1;
            m_scale.Minimum = 0;
            m_scale.Maximum = 100;
            m_scale.MinorIntervalValue = 2;
            m_scale.MajorIntervalValue = 10;
            m_scale.StartAngle = 120;
            m_scale.GapSweepAngle = 300;
            m_scale.ScaleBarSize = 1.5;
            m_scale.Radius = 116;
            this.m_gauge.Scales.Add(m_scale);
            m_indicator = new StateIndicator();
            m_indicator.StateRanges.Add(new StateRange(10, 20));
            m_indicator.StateRanges.Add(new StateRange(50, 60));
            m_indicator.IndicatorStyle = IndicatorStyle.RoundedRectangularLED;
            m_indicator.BackgroundBrush = new RadialGradientBrush(Colors.White,Colors.DarkGreen);
            m_indicator.ActiveBackgroundBrush = new RadialGradientBrush(Colors.White, Colors.Red);
            m_indicator.IndicatorWidth = 20;
            m_indicator.IndicatorHeight = 20;
            m_indicator.Location = new Point(50, 80);
            m_gauge.StateIndicators.Add(m_indicator);
            this.Content = m_gauge;
        }
    }
}
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.GaugeElement
                        Syncfusion.Windows.Gauge.LocalizableGaugeElement
                           Syncfusion.Windows.Gauge.StateIndicator

AssemblyVersion

Syncfusion.Gauge.WPF: 17.4460.0.46

See Also