RadButton Visual State Change on DragEnter / DragLeave

2 posts, 0 answers
  1. Nadina
    Nadina avatar
    9 posts
    Member since:
    Jul 2012

    Posted 20 Aug 2013 Link to this post

    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.
  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 22 Aug 2013 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top