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

Problem with Drag And Drop 2010 Q3 SP1

1 Answer 70 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 2
Kevin asked on 23 Jan 2011, 03:37 PM
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/

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 24 Jan 2011, 12:56 PM
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>>
Tags
DragAndDrop
Asked by
Kevin
Top achievements
Rank 2
Answers by
Tsvyatko
Telerik team
Share this question
or