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

Is it possible to handle RadDragAndDropManager DragQuery event without code behind?

1 Answer 110 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rodd
Top achievements
Rank 1
Rodd asked on 26 Aug 2011, 04:51 PM
I have a RadTreeView control.  Currently in code behind I'm doing:
public EntityNavigator()
{
    InitializeComponent();
    UnitTree.AddHandler(RadDragAndDropManager.DropQueryEvent, new EventHandler<DragDropQueryEventArgs>(UnitTree_DropQuery), true);
}

I typically try to do as little code behind as possible and I'd prefer to handle this in my ViewModel instead.  Is there a way to handle the DragQuery in my ViewModel via a xaml binding rather than doing AddHandler() in my code behind?

Thanks for your help.

Rodd

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 31 Aug 2011, 08:27 AM
Hello Rodd,

 This is the only way to add handler for already handled events.Feel free to ask if you have more questions.

Kind regards,
Petar Mladenov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
TreeView
Asked by
Rodd
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or