Back to Devexpress

How to: Create and Customize a RangeTrackBarEdit

wpf-10508-controls-and-libraries-data-editors-getting-started-how-to-create-and-customize-a-rangetrackbaredit.md

latest1.3 KB
Original Source

How to: Create and Customize a RangeTrackBarEdit

  • Apr 01, 2021
  • 2 minutes to read

The Range TrackBarEdit editor allows you to specify a range of values.

This document demonstrates how to create a Range TrackBarEdit control.

Create a New Project and Add a RangeTrackBarEdit

  1. Run MS Visual Studio 2010.

  2. Create a new WPF Application project. For this, choose New Project on the File menu or press Ctrl+Shift+N , and then choose WPF Application.

  3. Add a TrackBarEdit component to the project.

  4. In XAML, set the StyleSettings property to “TrackBarZoomRangeStyleSettings”.

Specify the Range

  1. Right click the TrackBarEdit and select Properties. To specify the minimum and maximum values, set the RangeBaseEdit.Minimum property to -273 and the RangeBaseEdit.Maximum property to 120.

  2. To customize the selection, set the TrackBarEdit.SelectionStart property to -45 and the TrackBarEdit.SelectionEnd property to 40.

  3. Run the application to see the result.