Drop event and child windows

3 posts, 0 answers
  1. leviathan
    leviathan avatar
    2 posts
    Member since:
    May 2009

    Posted 29 May 2009 Link to this post


    I'm trying to use the drag drop control in a silverlight child window. Unfortunately, I am still unable to catch the DropInfoEvent and DropQueryInfo events (both drag events work). I tried to put the exact same code out of the child window (in a UserControl for instance) and everything works fine. Does anyone know what the problem might be?

    Thanks in advance.

  2. Miroslav
    Miroslav avatar
    922 posts

    Posted 29 May 2009 Link to this post

    Hi leviathan,

    I guess you are using the Silverlight 3 Child Window.

    "Windows" in Silverlight come up in popups and by default popups are not part of the main visual tree. Therefore the DragDrop does not know about them.

    There is a property on the DragDrop option, called ParticipatingVisualRoots. You can add the currently opened child windows there and they will participate in the DragDrop. I guess you can keep a static collection with all the opened windows and add it during DragInfo.

    You can do this transparently by adding a DragInfo handler to the root visual of the application that will do this for every successful drag operation.

    We will look into making this easier after the Q2 release. Currently we build the controls for the Silverlight 2, we will be adding Silverlight 3 specific features after this release.

    On a side note, you can use the Telerik RadWindow which works out of the box with DragDrop.

    Sincerely yours,
    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.
  3. DevCraft R3 2016 release webinar banner
  4. leviathan
    leviathan avatar
    2 posts
    Member since:
    May 2009

    Posted 29 May 2009 Link to this post

    Hello Miroslav ,

    Thanks a lot for the quick reply.

    I added my child window to the ParticipatingVisualRoots collection and it is working fine.



Back to Top