:: RangeSlider for Winforms ::
1. What it does it do?
RangeSlider is a WPF .dll for Winforms.
1.2. Features
Trackbar with 2 thumbs where you can select a range not just a value.
2. Requirements
- Winforms
3. Installation
Download source code and compile.
4. Tutorial
Add a reference to the .dll to your project. In designer add an ElementHost Element to your Winforms. In your main class add this code in the constructor:
rs = new BetterControl.RangeSlider();
rs.InitializeComponent();
rs.LowerValue = 30;
rs.UpperValue = 90;
rs.Minimum = 0;
rs.Maximum = 100;
this.elementHost1.Child = rs;
rs.OnLowerSlider_ValueChanged += new BetterControl.RangeSlider.MyControlEventHandler(rs_OnLowerSlider_ValueChanged);
rs.OnUpperSlider_ValueChanged += new BetterControl.RangeSlider.MyControlEventHandler(rs_OnUpperSlider_ValueChanged);
1 comment
[ 2.5 ms ] story [ 10.4 ms ] thread1.2. Features Trackbar with 2 thumbs where you can select a range not just a value.
2. Requirements - Winforms
3. Installation Download source code and compile.
4. Tutorial Add a reference to the .dll to your project. In designer add an ElementHost Element to your Winforms. In your main class add this code in the constructor:
rs = new BetterControl.RangeSlider(); rs.InitializeComponent(); rs.LowerValue = 30; rs.UpperValue = 90; rs.Minimum = 0; rs.Maximum = 100; this.elementHost1.Child = rs; rs.OnLowerSlider_ValueChanged += new BetterControl.RangeSlider.MyControlEventHandler(rs_OnLowerSlider_ValueChanged); rs.OnUpperSlider_ValueChanged += new BetterControl.RangeSlider.MyControlEventHandler(rs_OnUpperSlider_ValueChanged);
and add the function for the value changed:
void rs_OnLowerSlider_ValueChanged(object sender, double result)
{ MessageBox.Show("L"+result.ToString()); }
void rs_OnUpperSlider_ValueChanged(object sender, double result) { MessageBox.Show("U" + result.ToString()); }
web+Git: https://tetramatrix.github.io/rangeslider/