Dim
Dim

Reputation: 4837

WPF slider seek to clicked position

the default slider behavior is when clicked after the point it ticks by some value, and when clicked before the point is does the opposite. I wish it to behave like in windows media player, when I click position it will jump to it. How can I do this?

Upvotes: 1

Views: 1315

Answers (1)

Viv
Viv

Reputation: 17398

You probably aren't setting Slider.IsMoveToPointEnabled. With this being set to True, the Slider should move to the point clicked

<Slider Width="200"
        IsMoveToPointEnabled="True"
        Maximum="1000"
        Minimum="0" />

Upvotes: 4

Related Questions