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

RadButton Visual State Change on DragEnter / DragLeave

1 Answer 51 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Nadina
Top achievements
Rank 1
Nadina asked on 20 Aug 2013, 11:40 AM
How do I change the RadButton visual state on the DragEnter and DragLeave events?

I have a RadPane docked left. WIthin this pane is a RadListBox and a few RadButtons. The desired behavior is that dragging a listboxitem onto a RadButton will cause the visual state of the RadButton to change on the DragEnter, similar in effect to dragging an item onto the TrashCan button on a Mac computer.

The DragEnter and DragLeave events are handled in the VB.Net code behind and are firing. The DragEnter event changes the cursor to Hand and sets the RadButton.ToolTip to some descriptive text. The DragLeave undoes this behavior. But despite event execution, the visual state does not change on the RadButton; the cursor never changes to hand and the tooltip text does not appear.

The DragVisualOffset has its x & y relative starting points set to -55 in the DragInitialize so that the drag visual state is well clear of the mouse pointer and RadButton when the DragEnter event fires.

1 Answer, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 22 Aug 2013, 08:42 AM
Hi Nadina,

May I ask you to share a bit more info on your approach and implementation? 
Some sample code of the setting of the states and tooltips will be very helpful.

Thank you in advance! 

Regards,
Nik
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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
DragAndDrop
Asked by
Nadina
Top achievements
Rank 1
Answers by
Nick
Telerik team
Share this question
or