Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1735
XamNumericSlider Thumb template
posted

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 ?

SliderTemplate.zip
Parents
No Data
Reply
  • 1670
    posted

    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.

Children