By design, the thumb is moved when handling MouseDown
. As a result, the value is changed. This logic is at a location that is too deep in the RadTrackBar
functionality for any customization to have effect on it. However, you can handle the MouseUp
event and achieve the desired functionality. Here is a sample code snippet. Note that this is just a sample approach and it may not cover all possible cases. Feel free to modify it in a way which suits your requirement best.
.radTrackBar1.MouseUp += radTrackBar1_MouseUp;
.radTrackBar1.ValueChanged += radTrackBar1_ValueChanged;
lastValue = 0;
previousValue = 0;
sender, EventArgs e)
.radTrackBar1.Value != previousValue)
.radTrackBar1.Value = previousValue;
sender, MouseEventArgs e)
previousValue = lastValue;
.radTrackBar1.Value = lastValue;
I hope this information helps. If you have any additional questions, please let me know.