MindFusion.Wpf Pack Programmer's Guide
Indicator.States Property
See Also
 





Gets or sets a collection of CustomInterval objects, which define various states for the indicator. This is a dependency property.

Namespace: MindFusion.Gauges.Wpf
Assembly: MindFusion.Gauges.Wpf

 Syntax

C#  Copy Code

public CustomIntervalCollection States { get; set; }

Visual Basic  Copy Code

Public Property States As CustomIntervalCollection

 Property Value

An instance of the CustomIntervalCollection class.

 Remarks

To define new states for the indicator, create new CustomInterval objects, set their range through their MinValue and MaxValue properties, and add them to this collection.

 Example

The following example illustrates how to create several states for an indicator through XAML:

XAML  Copy Code

<gauges:Indicator>
  <gauges:Indicator.States>
    <gauges:CustomInterval MinValue="0" MaxValue="10" Fill="DarkGreen" gauges:Indicator.ActiveColor="DarkGreen" />
    <gauges:CustomInterval MinValue="10" MaxValue="20" Fill="Green" gauges:Indicator.ActiveColor="Green" />
    <gauges:CustomInterval MinValue="20" MaxValue="30" Fill="Lime" gauges:Indicator.ActiveColor="Lime" />
    <gauges:CustomInterval MinValue="30" MaxValue="40" Fill="Yellow" gauges:Indicator.ActiveColor="Yellow" />
    <gauges:CustomInterval MinValue="40" MaxValue="50" Fill="Orange" gauges:Indicator.ActiveColor="Orange" />
    <gauges:CustomInterval MinValue="50" MaxValue="60" Fill="Red" gauges:Indicator.ActiveColor="Red" />
  </gauges:Indicator.States>
</gauges:Indicator>

 See Also

Indicator Members
Indicator Class
MindFusion.Gauges.Wpf Namespace