Slide on/off

2 posts, 0 answers
  1. Kuba
    Kuba avatar
    13 posts
    Member since:
    Aug 2013

    Posted 10 Sep 2013 Link to this post

    Hello!

    I am looking for a special component. It should be a slide bar on/off - something like this:
    http://st.depositphotos.com/1575949/1271/v/950/depositphotos_12715551-On-Off-switch-slide-button-.jpg

    Do you have something like this? Or maybe can you tell me how to create it for example from RadHScrollBar?

    Many thanks

    Kuba

    Edit: OK! I'm close to get this component using RadHScrollBar. I have only one problem with it. There are ScrollsRadButtons. I define them Visibility to Collapsed, but they are there still. I can't slide my bar to the end (see attachment). I tried use PositionOffset and Location properties but it doesn't work. That buttons don't disappear. Only Margin properties looked good, but it changes size of thumb too much. I tried to set AutoSize property to False, but then my Thumb disappear and I don't know where (see attachment2).

    What can I do to repair it?
  2. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 13 Sep 2013 Link to this post

    Hello Kuba,

    Thank you for writing.

    The scroll bar has a specific purpose and is not easy to modify it for scenarios different than to scroll. I have prepared a small project where I have implemented a custom control which follows the design form the image you have attached. As the aim of this project is demonstrational there are some best practices that are not followed e.g there are some hard coded values.

    I hope this will be useful. Should you have further questions, I would be glad to help.

    Regards,
    Ivan Petrov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top