Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Slider > Slider with small Width...

Answered Slider with small Width...

Feed from this thread
  • Michal avatar

    Posted on Oct 7, 2009 (permalink)

    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

    Reply

  • Answer Kiril Stanoev Kiril Stanoev avatar

    Posted on Oct 7, 2009 (permalink)

    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.
    Attached files

    Reply

  • Michal avatar

    Posted on Oct 8, 2009 (permalink)

    Hi Kiril.

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

    Best regards,
    Michal

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > Slider > Slider with small Width...
Related resources for "Slider with small Width..."

WPF Slider Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]