TrackBarFor

TrackBarFor is a slider that provides end-users with fast and easy visual data selection capabilities.

Implementation Details

TrackBarFor is realized by the TrackBarExtension class. Its instance can be accessed via the ExtensionsFactory<ModelType>.TrackBarFor<ValueType> helper method, which is used to add a TrackBarFor extension to a view. This first method's parameter is an expression that identifies model property to display and edit. The second method's parameter provides access to the TrackBarFor's settings implemented by the TrackBarSettings class, allowing you to fully customize the extension.

TrackBarFor's client counterpart is represented by the ASPxClientTrackBar object.

Declaration

TrackBarFor can be added to a view in the following manner.

View code (Razor):

@Html.DevExpress().TrackBarFor(model => model.Price,
     settings => {
          settings.Properties.SmallTickFrequency = 5;
          settings.Properties.LargeTickInterval = 10;
          settings.Properties.MaxValue = 50;
          settings.Properties.ScalePosition = ScalePosition.RightOrBottom;
     }
).GetHtml()

The code result is demonstrated in the image below.

TrackBar_Over

See Also