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

Slider with small Width...

2 Answers 159 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Michal
Top achievements
Rank 1
Michal asked on 07 Oct 2009, 05:36 AM

Hi.

I updated to Q2 2009 SP1 and now I have problem with small sliders (Width less than 56).
I use default theme (I think Office_black) and when I want to create slider with small Width it is not working right.

For example I want to do something like this:

myTestSlider = new Telerik.Windows.Controls.RadSlider();
myTestSlider.IsSnapToTickEnabled = true;
myTestSlider.TickPlacement = Telerik.Windows.Controls.TickPlacement.None;
myTestSlider.TickFrequency = 1;
myTestSlider.Focusable = false;
myTestSlider.Width = 34; // 8+20+6
myTestSlider.Minimum = 1;
myTestSlider.Maximum = 10;
Canvas.SetLeft(myTestSlider, 10);
Canvas.SetTop(myTestSlider, 10);
myTestCanvas.Children.Add(myTestSlider);

Slider Control has width 34 but its "internal" parts look and work like on width around 56 and so right part is not visible and goes beyond right border.
I don’t know if I am doing something wrong but currently I am not able to make small sliders.

Best regards,
Michal

2 Answers, 1 is accepted

Sort by
0
Accepted
Kiril Stanoev
Telerik team
answered on 07 Oct 2009, 07:29 AM
Hi Michal,

Thank you for reporting this inconsistency, which is caused by a MinWidth set in the template of RadSlider. We will make sure to fix it as soon as possible. As a workaround, you can edit the ControlTemplate of RadSlider and remove the problematic MinWidth. I have attached a sample project that demonstrates how to add a RadSlider with Width="34" to a Canvas.
Give it a try and let me know if you experience any problems or you have additional questions.

Sincerely yours,
Kiril Stanoev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Michal
Top achievements
Rank 1
answered on 08 Oct 2009, 05:33 AM
Hi Kiril.

Thank you for answer, with your ControlTemplate RadSlider works correctly.

Best regards,
Michal
Tags
Slider
Asked by
Michal
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Michal
Top achievements
Rank 1
Share this question
or