TrackBar allows you to display custom items instead of automatically generated scale marks. Populate the Items collection to activate ASPxTrackBar's items display mode. This collection can be filled manually or populated automatically through binding the editor to a data source. In items display mode, setting the MinValue/MaxValue, LargeTickInterval/SmallTickFrequency and Step properties are not in effect. Scale labels, tick marks and possible positions to which drag handles can be moved by end-users correspond directly to items from the Items collection. When an end-user selects an item, the item's index is assigned to the editor's Position (or PositionStart/PositionEnd) property.
For each item you can define:
-
the text displayed as the item label (the TrackBarItem.Text property);
-
unique item value (the TrackBarItem.Value property);
-
the text displayed within a value tooltip invoked for the item when it is being selected by an end-user (the TrackBarItem.ToolTip property).
The type of item values can be centrally specified via the editor's ValueType property (by default it is set to Decimal).
This demo illustrates how to use ASPxTrackBar's client API to synchronize item selection with the display of the corresponding image. ASPxTrackBar and a standard Repeater (whose ItemTemplate contains an ASPxImage control in this demo) are bound to the same XML data file.