4 Answers, 1 is accepted
0
Hello Damon,
You can find an example attached. Give it a try and let me know how it works for you.
Best wishes,
Kiril Stanoev
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.
You can find an example attached. Give it a try and let me know how it works for you.
Best wishes,
Kiril Stanoev
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
Bob Mills
Top achievements
Rank 2
answered on 30 Sep 2009, 08:01 PM
I have downloaded the example and tried to implement it in my project but the events are not firing. How can I check to see if they are wired properly?
0
Hello Bob Mills,
Unfortunately there is no way to check whether a handler for an event has been added (other than it firing).
I can suggest several things:
1. If you cannot add the handlers directly to the ListBoxes, add them to one of their visual parents. The handlers from the example should still work. In the example, you can replace the wiring with:
...and the drag-drop will still work.
2. Inherit the ListBox and add the handlers in its contstructor. This way you will know that they have been added for sure.
3. Add a debug class handler. Class handlers are handlers that fire at each instance of the given class for the event route. If you add a class handler for FrameworkElement, the handler will be called for each element that the event passes through and you will be able to see if the event does not reach its destination for some reason. To add a class handler for FrameworkElement, you can use this syntax:
All the best,
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.
Unfortunately there is no way to check whether a handler for an event has been added (other than it firing).
I can suggest several things:
1. If you cannot add the handlers directly to the ListBoxes, add them to one of their visual parents. The handlers from the example should still work. In the example, you can replace the wiring with:
this.AddHandler(RadDragAndDropManager.DropQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnDropQuery)); |
this.AddHandler(RadDragAndDropManager.DragQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnDragQuery)); |
this.AddHandler(RadDragAndDropManager.DropInfoEvent, new EventHandler<DragDropEventArgs>(OnDropInfo)); |
this.AddHandler(RadDragAndDropManager.DragInfoEvent, new EventHandler<DragDropEventArgs>(OnDragInfo)); |
...and the drag-drop will still work.
2. Inherit the ListBox and add the handlers in its contstructor. This way you will know that they have been added for sure.
3. Add a debug class handler. Class handlers are handlers that fire at each instance of the given class for the event route. If you add a class handler for FrameworkElement, the handler will be called for each element that the event passes through and you will be able to see if the event does not reach its destination for some reason. To add a class handler for FrameworkElement, you can use this syntax:
EventManager.RegisterClassHandler(typeof(FrameworkElement), |
RadDragAndDropManager.DragQueryEvent, |
new EventHandler<DragDropQueryEventArgs>(OnDebugDragQuery)); |
All the best,
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
Frédéric
Top achievements
Rank 1
answered on 15 Oct 2009, 02:16 PM
maybe you forgave to get back the configurations set inside the resource part of the demo
I had the same issue and solved it like that
I had the same issue and solved it like that