StateIndicatorControl.StateIndex Property
Namespace: DevExpress.Xpf.Gauges
Assembly:
DevExpress.Xpf.Gauges.v23.2.dll
NuGet Package:
DevExpress.Wpf.Gauges
Declaration
public int StateIndex { get; set; }
Public Property StateIndex As Integer
Property Value
Type |
Description |
Int32 |
An integer value that is the current state index.
|
Example
This example demonstrates how to create and customize a StateIndicatorControl.
View Example
using System.Windows;
using System.Windows.Input;
namespace DXGauges_StateIndicator {
public partial class MainWindow : Window {
public MainWindow() {
InitializeComponent();
}
private void stateIndicatorControl1_MouseEnter(object sender, MouseEventArgs e) {
stateIndicatorControl1.StateIndex = 0;
}
private void stateIndicatorControl1_MouseLeave(object sender, MouseEventArgs e) {
stateIndicatorControl1.StateIndex = 2;
}
}
}
<Window x:Class="DXGauges_StateIndicator.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxga="http://schemas.devexpress.com/winfx/2008/xaml/gauges"
Title="MainWindow" Height="350" Width="525" >
<Grid>
<dxga:StateIndicatorControl Name="stateIndicatorControl1" StateIndex="2"
MouseEnter="stateIndicatorControl1_MouseEnter"
MouseLeave="stateIndicatorControl1_MouseLeave">
<!--region #Model-->
<dxga:StateIndicatorControl.Model>
<dxga:SmileStateIndicatorModel />
</dxga:StateIndicatorControl.Model>
<!--endregion #Model-->
</dxga:StateIndicatorControl>
</Grid>
</Window>
Imports Microsoft.VisualBasic
Imports System.Windows
Imports System.Windows.Input
Namespace DXGauges_StateIndicator
Partial Public Class MainWindow
Inherits Window
Public Sub New()
InitializeComponent()
End Sub
Private Sub stateIndicatorControl1_MouseEnter(ByVal sender As Object, ByVal e As MouseEventArgs)
stateIndicatorControl1.StateIndex = 0
End Sub
Private Sub stateIndicatorControl1_MouseLeave(ByVal sender As Object, ByVal e As MouseEventArgs)
stateIndicatorControl1.StateIndex = 2
End Sub
End Class
End Namespace
See Also