Example E3522
Visible to All Users

WPF Gauge - Create a State Indicator

This example demonstrates how to create a State Indicator.

Please read the following help topic for step-by-step instructions: Create a State Indicator.

WPF Gauge - Create a State Indicator, DevExpress

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

Example Code

DXGauges_StateIndicator/MainWindow.xaml
XAML
<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>
DXGauges_StateIndicator/MainWindow.xaml.cs(vb)
C#
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; } } }

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.