This is a migrated thread and some comments may be shown as answers.

How to add major and minor ticks to the slider?

2 Answers 154 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Adnan
Top achievements
Rank 1
Adnan asked on 04 Apr 2017, 08:27 AM
I am trying to create the slider design demonstrated in the attachment (with making tick crossing the track of the slider), but I had many difficulties. Is it possible to do this design? what is the simplest way to do it? I hope the answer is explained with a sample project. 

2 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 07 Apr 2017, 08:12 AM
Hello Adnan,

There are several articles describing how you can change the appearance of RadSlider. You can find them in the Styling and Appearance and How To sections in our documentation.

Hope this helps.

Regards,
Tanya
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
0
Evgenia
Telerik team
answered on 07 Apr 2017, 02:56 PM
Hello Adnan,

As a follow-up, I am sharing a small project demonstrating how you can modify the default style of RadSlider to have the Ticks appear on top of the Track. Since we don't support Major and Minor ticks (the different size of the ticks) out-of-the-box I highly recommend that you  go through this help topic which demonstrates how you might achieve it via TicksTemplateSelector. Inside the custom logic of the SelectTemplate method you might check if your Tick is even and apply the template with smaller Height. If odd let it take the default Template of the Ticks (with bigger Height).

Please mind that the project attached uses Office2016 theme that is currently supported only with Implicit styles theming mechanism. So to be able to run the project please add reference to assemblies from Binaries.NoXAML folder under your Telerik controls local installation path. You can read more about implicit styles and our Binaries.NoXAML folder in this help topic.

Feel free to modify the attachment per your own scenario needs.

Regards,
Evgenia
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Slider
Asked by
Adnan
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Evgenia
Telerik team
Share this question
or