State Indicator Gauges
- 3 minutes to read
This document gives detailed information on State Indicator Gauge types provided with the ASPxGaugeControl component, and explains how they should be used in your application.
For details on other gauge types, refer to the corresponding topics of the Gauge Types section.
State Indicator Gauges Overview
A state indicator gauge is a container of state indicators - objects that have states and vector images associated with them.
Visually, a state indicator displays nothing but an image associated with the current state. When a state indicator's state changes, a corresponding image is automatically displayed. So, a state indicator gauge is appropriate for imitating static visual objects that have a fixed set of states (for instance, bulbs, traffic lights, arrows, etc.).
The following image shows three gauges, each of which displays a static indicator having a specific state.
State indicators display images according to their states. A set of images for state indicators is predefined.
All images for state indicators can be grouped into the following categories.
- Currency Symbols;
- Car lcons;
- Electric Lights;
- Traffic Lights.
Some of the images from these categories are shown below.
A full set of indicator's images is available at design time in the gauge preset manager.
A State Indicator Gauge is represented by an instance of the StateIndicatorGauge class. This object can be accessed as an item of the GaugeCollectionWeb object returned by the ASPxGaugeControl.Gauges property of the ASPxGaugeControl object.
See the following code.
ASPxGaugeControl gaugeControl1 = new ASPxGaugeControl(); StateIndicatorGauge gauge1 = gaugeControl1.Gauges as StateIndicatorGauge;
You can create a State Indicator Gauge control either at design time within Visual Studio or programmatically at runtime. The following example demonstrates how this can be done.
State Indicator Elements
This section describes state indicator gauge elements, as well as gives a brief overview of their properties.
A state indicator gauge consists of a base indicator element.
The following image shows a sample state indicator gauge indicating gauge elements.
A state indicator gauge can display one or more state indicators, and each can have its own set of states. In the image above, the gauge contains two state indicators.
It provides the following main display options:
- StateIndicator.States - contains states for the indicator;
- StateIndicator.StateIndex - specifies the current state;
- StateIndicator.Center - specifies the position of the state indicator within the gauge.
For more information on gauge elements, see the State Indicator (Visual Elements) section.