netmajor
netmajor

Reputation: 6585

Change slider position on custom place

I have Slider which show changing time of playing song. Slider show changing tick ok, but I want click on whatever place on Slider that value change then.

But now when I click that, value change only on 1 second. How could I change this behavior?

Upvotes: 0

Views: 1495

Answers (2)

Adam
Adam

Reputation: 15813

If you want to make sure the slider can be moved to any point (not just on the predefined ticks), set IsSnapToTickEnabled to false:

<Slider IsSnapToTickEnabled="False" />

But if you are trying to make the slider jump to the point you click at on the slider track, use the solution outlined in this answer and allow move-to-point behaviour:

<Slider IsMoveToPointEnabled="True" />

Upvotes: 2

Jonathon Reinhart
Jonathon Reinhart

Reputation: 137547

It sounds like you need to adjust the resolution of your slider. Do this by adjusting the Minimum and Maximum values, such that you get a better range.

Upvotes: 0

Related Questions