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

Control.AddHandler does not accept Telerik Routed event

3 Answers 239 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kevin Hendriks
Top achievements
Rank 1
Kevin Hendriks asked on 03 Nov 2009, 10:58 AM
Hello,

For my demo application I am trying to implement Drag and Drop functionality. But if I am using Silverlight Controls I can not use the following line of code
 (this line of code is from the treeview example DragAndDrop towards the textbox, From the Silverlight Q2 silverlight examples)

this

 

 

.target.AddHandler(RadDragAndDropManager.DropQueryEvent,

 

 

 

new EventHandler<DragDropQueryEventArgs>(TextBox_OnDropQuery));

 


First of because the Silverlight control has only 1 AddHandler methode wich is the following. Source
So I added true to it.
Argument 1: cannot convert from 'Telerik.Windows.RoutedEvent' to 'System.Windows.RoutedEvent' 

Are the examples not right? Or am I doing something terably wrong because I don't have those methods

3 Answers, 1 is accepted

Sort by
0
Accepted
Miroslav
Telerik team
answered on 03 Nov 2009, 11:26 AM
Hello Kevin,

There is an AddHandler extension method and you need the Telerik.Windows namespace to see it.

Please include

using Telerik.Windows;

in your usings.

Hopefully this will work for you,

Regards,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kevin Hendriks
Top achievements
Rank 1
answered on 03 Nov 2009, 11:38 AM

With that line of code it works. It might be usefull to include it in the documentation that you need that line.

I also figured out in the meanwhile that the following line also works without having the namespace.

 

RadDragAndDropManager

 

 

.AddDropInfoHandler(target, TextBox_OnDropInfo);

 


Thanks for the help.
0
spj11
Top achievements
Rank 1
answered on 04 Apr 2012, 11:10 PM
Is AddHandler/RemoveHandler no longer available in Telerik.Windows? Also is there an alternative?
Tags
DragAndDrop
Asked by
Kevin Hendriks
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Kevin Hendriks
Top achievements
Rank 1
spj11
Top achievements
Rank 1
Share this question
or