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

Big problem with drag and drop

1 Answer 78 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 20 Jul 2009, 11:00 AM
Hello,
I'm trying to develop a simple sample with drag and drop but I've got big iussue...
first of all in all the C# demos I've got this :

 
    this.AddHandler(RadDragAndDropManager.DragQueryEvent, 
                new EventHandler<DragDropQueryEventArgs>(AllowAllDragsEventHandler), true); 
 

In C# does not exist AddHandler but += and -= ...am I missing something lately??

I tried converting all in += but as I run my user control in a webpage I got a stackoverflow of  EventHandler<DragDropQueryEventArgs> DragQuery

Another weird thing is that if I enable this :

  RadDragAndDropManager.SetAllowDrop(this, true); 

Visual Studio 2008 crashes! (I've got a draganddroplistview as the sample and nothing else special inside...) If I turn if off it design it correctly....

Any suggestion?
Thanks in advance

Paolo



1 Answer, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 20 Jul 2009, 11:20 AM
Hello Paolo,

The AddHandler is an extension method and you need the

using Telerik.Windows;

in your usings to see it. This is a standard pattern for registering handlers for routed events in both Silverlight and WPF. The routed events are not standard CLR events, although sometimes you do get convenience wrappers for them.

I tried to reproduce this in a sample project but I could not:

RadDragAndDropManager.SetAllowDrop(this, true);

Could you give us more information about the project you are using or best, send us a sample that breaks on your side.

Best wishes,
Miroslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
DragAndDrop
Asked by
Michele
Top achievements
Rank 2
Answers by
Miroslav
Telerik team
Share this question
or