Nevron Open Vision Documentation
Slider

The slider is a widget that lets the user select a distinct value in a given range by dragging a thumb. A slider has the following structure:

Properties

The slider provides the following properties:

Code Example

The following piece of code demonstrates how to create a slider and handle its ValueChanged event:

Slider Example
Copy Code
NSlider slider = new NSlider();
slider.HorizontalPlacement = ENHorizontalPlacement.Left;
slider.PreferredWidth = 300;
slider.ValueChanged += new Function<NValueChangeEventArgs>(OnSliderValueChanged);

private void OnSliderValueChanged(NValueChangeEventArgs args)
{
    double newValue = (double)args.NewValue;
}
Range Sliders
Unlike regular sliders, which can be used only to select a single value, range sliders can be used to pick two values or said in other words - a range. They have a begin and an end thumb, which control the size of the standard thumb (the range). You can use the BeginValue and the EndValue of the range sliders to get/set the currently selected range. Range sliders in NOV are represented by the NRangeSlider class, which inherits the NSlider class, so you can use its Orientation property to specify its orientation.
See Also
Send Feedback