Problem with Drag And Drop 2010 Q3 SP1

2 posts, 0 answers
  1. Kevin
    Kevin avatar
    83 posts
    Member since:
    Sep 2008

    Posted 23 Jan 2011 Link to this post

    hey guys,

    I'm experiencing a problem with Drag And Drop within my RadTreeView...  This worked fine under 2010 Q3, just since installing the SP1 I am getting this bug.. the code from the RadTreeView is below.... 

    the error i'm receving is..

    "An exception of type 'System.InvalidOperationException' occurred in Telerik.Windows.Controls.dll but was not handled in user code

    Additional information: Root AdornerLayer Not Found. Please make sure that your root visual is Window or other element that has an adorner layer. Alternatively, wrap your root panel in an <AdornerDecorator> element."

    further info...

    "Error. Root AdornerLayer Not Found. Please make sure that your root visual element is window or other element that has an adorner layer alternatively wrap your root panel in an <AdornerDecorator> element.

    When attempting to drag an element..

    <DockPanel LastChildFill="True">
    <telerikNavigation:RadTreeView x:Name="uiActivitiesList" IsDragDropEnabled="True" Margin="-20,0,0,0"
    BorderThickness="0" HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch" TextDropAfter="Drop After" TextDropBefore="Drop Before"
    SelectionChanged="uiActivitiesList_SelectionChanged" SelectionMode="Multiple" dragDrop:RadDragAndDropManager.AllowDrop="True" IsDragPreviewEnabled="False"
    IsDragTooltipEnabled="True" DragEnded="uiActivitiesList_DragEnded" SourceUpdated="uiActivitiesList_SourceUpdated"
    ItemsSource="{Binding ActivityModelViewCollection, NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True,Mode=OneWay}"/>
    </DockPanel>


    I'm unsure if this is a bug or if i just need to wrap my user control in an AdornerDecorator, but some further information would be great.
    http://eeuauaughhhuauaahh.ytmnd.com/
  2. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 24 Jan 2011 Link to this post

    Hello kevin,

    Unfortunately, I was unable to get the issue based on the code snipped posted.
     Nevertheless, this issue often occurs when the root element does not have the corresponding adorner layer (due to its specific structure or specific template).

    In this scenario I can suggest one of the following options:

     - Enable native drag mode - set RadDragAndDropManager.EnableNativeDrag = true in the App constructor. This mode does not relies on adorers to perform drag/drop operation
    - Wrap the root visual in adorer decorator.

    Let me know if this helps.


    Regards,
    Tsvyatko
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top