I wish to customize the appearance of the basic WPF TickBar. I was wondering if there was a simple way to do this using a control template:
I wish to have numbers in place of ticks along the tickbar. I want the position of the number to correspond to the value of a slider (much like the picture in the link).
I’ve searched around and one suggestion I found said to create a class that inherits from TickBar and override it’s OnRender method.
I’d much rather find a solution that doesn’t involve that. I was really hoping using a control template would do the trick. So, If there is one such solution, suggestions would be greatly appreciated! 🙂
Okay, I have a solution. I figured I should answer my question in the event some other fellow along the line runs into the same situation as I. 🙂
Override
OnRenderseems to be the most obvious solution. I was really hoping to use a template of sorts…sigh …ah well. Anyways, I ran across this discussion on MSDN’s forums which provided an answer to send me in the right direction.Simple, and it need a few tweeks to make it more flexible, so here’s my version: