I had a similar problem using Slider on Windows8 / WinRT.
My problem was this: I responded to a ValueChanged event and performed a lengthy operation (writing asynchronously to a file) after each trigger. And thus, it works with the simultaneous exception of editing. To avoid this, I used DispatcherTimer .
//Class member private DispatcherTimer myDispatcherTimer = null; private void OnSliderValueChanged(object sender, RangeBaseValueChangedEventArgs e) { //I update my UI right away ... //If the dispatcher is already created, stop it if (myDispatcherTimer!= null) myDispatcherTimer.Stop(); //Overwrite the DispatcherTimer and thus reset the countdown myDispatcherTimer= new DispatcherTimer(); myDispatcherTimer.Tick += (sender, o) => DoSomethingAsync(); myDispatcherTimer.Interval = new TimeSpan(0,0,2); myDispatcherTimer.Start(); } private async void DoSomethingAsync() { await DoThatLongSaveOperation(); }
You cannot directly determine the final value, but you can at least delay the operation until there is a long pause between the two updates (for example, in my case, if the user drags the slider and stops while saving the drag for 2 seconds, the save operation will be launched anyway).
source share