Skip to content

How can I get the new value after a user drags? #9501

Answered by castorix
haijialiu asked this question in Q&A
Discussion options

You must be logged in to vote

It seems like get value on time (that means if drags, I will get to many values ), but I want get the value after drag.

For the event when you release the Thumb, you can call ManipulationCompleted
In XAML :
ManipulationMode="All" ManipulationCompleted="slider1_ManipulationCompleted"
and

        private void slider1_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
        {
           var value = ((Slider)sender).Value;
           // ...
        }

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@haijialiu
Comment options

Comment options

You must be logged in to vote
1 reply
@haijialiu
Comment options

Answer selected by haijialiu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants