Drag'n Drop in a RadWindow

3 posts, 0 answers
  1. Guillaume
    Guillaume avatar
    39 posts
    Member since:
    Nov 2010

    Posted 24 Nov 2010 Link to this post

    Hello,

    In my Silverlight 4 app, i have an user control which contains a ListBox.
    I have implemented the Drag'n Drop on it. So, when i drag and drop a local file, it will upload it and  display it in my ListBox.
    The system works very well if i load my user control in a Silverlight Page.

    But sometime, i load this user control in a ChildWindow (from SL Toolkit) and it seems that the Drag'n Drop system doesn't work.
    In fact, when i drop my file in my ListBox (in the ChildWindow), Internet Explorer opens and display my file (for ex, a JPG file) and so skip the silverlight app.

    In another thread on this forum, i read you said to use the RadWindow and add :
    this.AddHandler(RadDragAndDropManager.DragInfoEvent, new EventHandler<DragDropEventArgs>(OnDropInfo), true);
     
    this.AddHandler(RadDragAndDropManager.DragInfoEvent, new EventHandler<DragDropEventArgs>(OnDragInfo), true);
     
    this.AddHandler(RadDragAndDropManager.DragQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnDragQuery), true);
     
    this.AddHandler(RadDragAndDropManager.DragQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnDropQuery), true);

    But when i drag my file in the ListBox (in RadWindow now), nothing appears (same behavior when i used ChildWindow) and events are nevers fired (i tested with breakpoints).
    Could you help me please ?

    Regards,
    Guillaume

    PS : I also add AllowDrop="True" in my RadWindow and "WindowLess" is false in the SL object.
  2. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 29 Nov 2010 Link to this post

    Hello Guillaume,

    In order to achieve the desired functionality you might want to use Drop event and allowdrop property provided by the framework. RadDragAndDropManager is designed to provide drag and drop functionality within Silverlight plug-in.

    I have prepared simplified version version of the scenario and seems that it works correctly. You might want to look at the logic you are using to upload files. I can suggest take a look at our RadUpload as it provides similar functionality.

    Best wishes,
    Tsvyatko
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. DevCraft banner
  4. Guillaume
    Guillaume avatar
    39 posts
    Member since:
    Nov 2010

    Posted 29 Nov 2010 Link to this post

    Hello,

    Thanks for you attachment but i tried your solution in my project but without success.

    I will continue to search.

    Regards,
    Guillaume
Back to Top