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

Slide on/off

1 Answer 161 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kuba
Top achievements
Rank 1
Kuba asked on 10 Sep 2013, 09:14 AM
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?

1 Answer, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 13 Sep 2013, 11:57 AM
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 >>
Tags
General Discussions
Asked by
Kuba
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Share this question
or