[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Collapse]Gauge Controls
   [Expand]Getting Started
    Value Indicators
   [Expand]Visual Elements
    [Collapse]Circular Gauges
      How to: Use ArcScale
      How to: Show Two Circular Scales Side-by-Side
      How to: Determine whether an Indicator's Value Falls into a Particular Range
      How to: Create a Knob-like Gauge
      How to: Place One Circular Scale into Another
    [Expand]Linear Gauges
    [Expand]Digital Gauges
    [Expand]State Indicators
    [Expand]End-User Interaction
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Determine whether an Indicator's Value Falls into a Particular Range

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E3328.

In some cases, you need to know whether or not the current value of an indicator is within a particular range. This example shows how to create a state indicator that changes its color depending on the current range.

First, the Circular gauge is created with three ranges and two empty sections. By default, the gauge's needle doesn't belong to any range, so the state indicator is painted as a gray ellipse.

To solve this task it's necessary to handle the RangeBase.IndicatorEnter and RangeBase.IndicatorLeave events in the following way:

- if a needle 'enters' a range, it is painted with the range color;

- if a needle 'leaves' a range, it is painted in gray.


In this example we set the ValueIndicatorBase.IsInteractive property to True, so that you can click on a gauge and manually change the current needle value.

Is this topic helpful?​​​​​​​