Slider Controls

Silverlight Elements contains two slider controls: Slider and DualSlider. Both display a track with slidable “thumbs” which allow the user to select values, and support tick marks which can be guidelines or can force the slider to “snap” to a tick-marked value.

The Slider control displays a single thumb, allowing the user to select a single value. The selected value is available through the Value property.

The DualSlider control displays two thumbs, allowing the user to select the start and end of a range. The selected values are available through the RangeStart and RangeEnd properties. The sliders may be constrained to a minimum or maximum distance, so that the range cannot be too great or too small, using the MinimumRange and MaximumRange properties. By default, the second slider cannot be dragged below the first slider: you can override this using the AllowOverlap property.

Both slider controls derive from SliderBase which implements tick mark display, spacing and snapping properties.

DualProgressBar Control

The DualProgressBar control acts similarly to a normal progress bar, but allows the progress of individual sub-operations to be shown. A second coloured bar is overlaid on the main progress bar to show the progress of the current sub-operation. The size of the overlay bar is specified using the NestedPercentage property, which is a value from 0 to 100 indicating the percentage of the main bar that should be overlaid.

You can overlay content on the progress bar (for example, to show a scale and/or current progress or operation) using the StartContent, EndContent and CenterContent properties.

NumericUpDown Control

The NumericUpDown control is a text box that allows the user to enter numeric values, and also to adjust the value using a pair of up-down buttons or the Up and Down arrow keys.