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





Gets the state the indicator is currently in. This is a dependency property.

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

 Syntax

C#  Copy Code

public CustomInterval CurrentState { get; set; }

Visual Basic  Copy Code

Public Property CurrentState As CustomInterval

 Property Value

An instance of the CustomInterval class.

 Remarks

The value of this property is updated automatically to reflect the current state of the indicator. The intention is to bind to this property from within the indicator's control template. Therefore, when the current state changed, the appearance of the indicator will change accordingly.

 Example

For example, the following XAML code illustrates the default template of the Indicator class and how it binds to the properties of the CurrentState:

XAML  Copy Code

<ControlTemplate TargetType="{x:Type local:Indicator}">
  <local:Led
    BorderBrush="{Binding Path=CurrentState.Stroke, RelativeSource={RelativeSource TemplatedParent}}"
    Background="{Binding Path=CurrentState.Fill, RelativeSource={RelativeSource TemplatedParent}}"
    GlowColor="{Binding Path=CurrentState.(local:Indicator.ActiveColor), RelativeSource={RelativeSource TemplatedParent}}" />
</ControlTemplate>

 See Also

Indicator Members
Indicator Class
MindFusion.Gauges.Wpf Namespace
DefaultState Property