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

Visual DragCue not visible

1 Answer 90 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Andrea
Top achievements
Rank 1
Andrea asked on 22 Jul 2016, 04:01 PM

Hi and thanks in advance!

I have a two-part wpf window, RadGridView on left, RadTreeView on right like the "Tree to grid drag example".

I need to drag&drop items from grid to tree (tree must be an Idef0 tree so I need to implement some custom logic in GridViewDragDropBehavior and TreeViewDragDropBehavior to avoid drop in some cases and notify user updating the DragVisual during drag).

All DragDropManager events are fired correctly and a I use DataTemplate and DropIndicationDetails (like your example) to initialize the DragVisual inside OnDragInitialize and update it inside OnDragOver...and I can populate the tree.

But DragVisual is never visible and I don't know why!

Without DragVisual notification and update (made with binding on DropIndicationDetails) it's pretty impossibile to understand the drop position and then notify the user if the operation is possible or not.

I'm using no xaml binaries dll and in MainSkin.xaml I have a ResourceDictionary with the following

<ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.GridView.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Data.xaml"/>
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
    </ResourceDictionary.MergedDictionaries>

Please help!

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 26 Jul 2016, 06:43 AM
Hello Andrea,

Please make sure that the required ResourceDictionaries are merged inside App.xaml. This is needed as DragVisual is in a different visual tree and if its Style is defined locally inside the Window Resources, the DragVisual will not receive it. That's why, the Styles should be merged at a global level inside App.xaml.

Let us know whether this helps.

Regards,
Yana
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
DragAndDrop
Asked by
Andrea
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or