Visual DragCue not visible

2 posts, 0 answers
  1. Andrea
    Andrea avatar
    1 posts
    Member since:
    Jan 2015

    Posted 22 Jul 2016 Link to this post

    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 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"/>

    Please help!

  2. Yana
    Yana avatar
    4604 posts

    Posted 26 Jul 2016 Link to this post

    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.

    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top