I'm trying to add my own template to the thumb for a XamNumericSlider, and have used the pattern described in the xamSlider->Thumb Styling sample in the Feature Browser. However, there are some issues:
1. The Feature Browser sample uses a XamNumericRangeSlider, and if I replace this with a XamNumericSlider I get a compile error like "Cannot add content to object of type 'Infragistics.Controls.Editors.XamNumericSlider' ". To solve this error I have to make my own subclass of XamNumericSlider and set its ContentProperty value to "Thumb". Why is XamNumericRangeSlider and XamNumericSlider different in this case ?
2. When using my thumb template the slider's track fill starts at a value of half the thumb width and also extends beyond the slider's max value with the same amount. I get the same effect if I use the original XamNumericRangeSlider sample. How can I fix this ?
Hello leifop,
Thank you for sharing your experience with xamSlider control. I will try to answer your questions :
1. The XamNumericSlider is different than XamNumericRangeSlider and you can not directly set the XamNumericSliderThumb , you should set it to Thumb property of XamNumericSlider, because simple sliders (XamDateTimeSlider including) do not support Content directly.
2. The second question actually seems to be a bug and after discussion with responsible developer i have created a work item in our bug tracking system for you. I will contact your DS to create a case for you so that you are notified when it is fixed.
If you have any other difficulties , please feel free to share them! Thank you in advance!
Regards,
Nikola.
Thank you for your reply. My current workaround for item 2 is to disable the track fill, but I'm looking forward to a bug-fix since my slider looks far better with the track fill turned on.
Leif