RadToggleSwitch improvements/bug?

1 Answer 119 Views
Buttons, RadioButton, CheckBox, etc
Martin
Top achievements
Rank 1
Martin asked on 14 Nov 2022, 12:35 PM

Hi folks!

Just recently I started using Telerik UI for WinForms, but while playing around with the controls to get used to them I found that the RadToggleSwitch doesn't behave like the toggle switches from WinUI/Win10/Win11.

First, the RadToggleSwitch can be activated and the slider can be dragged by using the right mouse button as well. That's not supposed to happen.

Second, the switch sometimes doesn't activate when clicking with the left mouse button. I couldn't find a consistent way to reproduce, though. Only the intermittent observation that the switch didn't change value even though I've clearly clicked inside the button area.

Perhaps a 1 pixel mouse movement between Press and Release will start a drag&drop operation for the slider instead of toggling the value?

Did anyone else experience this behavior?

 

Cheers

Martin

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 17 Nov 2022, 07:58 AM

Hello, Martin,     

Thank you for sharing your feedback with us. It is greatly appreciated.

RadToggleSwitch offers  ToggleStateMode property that determines how ToggleSwitch button should handle mouse click and drag. The available options are None, Click, Drag, ClickAndDrag. Indeed, right button clicking also toggles the state. 

I have logged it in our feedback portal by creating a public thread on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have also updated your Telerik points.

Currently, the possible solution that I can suggest is to cancel the ValueChanging event if the right mouse is clicked.

As to the second question about the problems with toggling the state, I was unable to observe such a behavior. Could you please specify the exact steps how to reproduce the problem or get back to me with a sample video demonstrating the exact scenario? 

Once we replicate the issue locally, we would be able to make an adequate analysis of the precise case and provide further assistance. Thank you.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Martin
Top achievements
Rank 1
commented on 17 Nov 2022, 09:43 AM

Thanks once again, Dess :)

Indeed, I've overlooked the ToggleStateMode property while playing around with the demo.

To reproduce the problem, you can start the demo app (Progress Telerik UI for WinForms R3 2022 SP2) and navigate to the Buttons/ToggleSwitch Button page.

I used the first ToggleSwitch ("Reminder").

If you move the mouse over the dot/slider, it gets highlighted, even if the form isn't focused at the moment.

Clicking on the ToggleSwitch does not trigger a state toggle. Only after clicking once (to activate the form), the second click will activate the button (but that's another case).

When the form is active, press the left mouse button insider the ToggleSwitch.

Now move your mouse 1 px up or down (but still inside the ToggleSwitch).

If you release the button now, the switch will not toggle.

Only if the mouse location at the moment of Press and Release are exactly the same, the toggle action will be triggered.

 

hth

Martin

Dess | Tech Support Engineer, Principal
Telerik team
commented on 18 Nov 2022, 02:28 PM

Hi,Martin,

I have logged it in our feedback portal by creating a public thread on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.

I have also updated your Telerik points.

In order to toggle the state, note that the mouse down and up locations should be within a certain offset for the ToggleStateMode.Click. That is why after moving the mouse, it doesn't change the value.

Currently, the possible solution that I can suggest is to use ToggleStateMode.ClickAndDrag.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Martin
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or