Venu CJ
Venu CJ

Reputation: 69

Circular Slider in WPF

I really want to create circular slider. I've been searching, but I can't find any information. So any tutorial, guide or if someone already created like this. Please post their XML code.

image

Upvotes: 2

Views: 6745

Answers (2)

Logan
Logan

Reputation: 816

Instead of making a circular slider (which as @auburg points out) would be a little unintutive to use (think the old telephone dials), consider making it a dial like a thermostat:

enter image description here

It's functionally very similar, but has a much larger hit-test area and is therefore less easy to mess-up for the user.

Try this guide: https://blogs.msdn.microsoft.com/jerrynixon/2012/12/06/walkthrough-building-a-sweet-dial-in-xaml-for-windows-8/

Upvotes: 3

Alexander Mandt
Alexander Mandt

Reputation: 307

A circular slider can be implemented just like a normal horizontal or vertical slider. The only difference would be that in the MouseMove event handler of the thumb during the drag operation you cannot just handle the horizontal or vertical position. Instead you have to calculate the angle relative to the center of the slider and map that to the value of the slider.

Upvotes: 1

Related Questions