RadTreeView - Customize Drag Preview image

3 posts, 0 answers
  1. Ian
    Ian avatar
    7 posts
    Member since:
    Jun 2014

    Posted 24 Jun 2014 Link to this post

    Is there anyway to customize a DragPreview in WPF when using Telerik RadTreeView?

    I've set  
    but all that does is display the namespace in a button rather than a preview of the actual item being dragged (which in this case is a row of a grid)

    Idon't necessarily need show a preview of the row I'm dragging - it would be good enough to show a standard image, just to give the user some feedback that the drag was taking place.</p>

    Any ideas how I could achieve this?

  2. Ian
    Ian avatar
    7 posts
    Member since:
    Jun 2014

    Posted 24 Jun 2014 in reply to Ian Link to this post

    Ok, I'm seeing that using the DragInfo method might allow me to change the drag image.  I feel like I'm getting closer... :)
  3. DevCraft R3 2016 release webinar banner
  4. Evgenia
    Evgenia avatar
    1396 posts

    Posted 27 Jun 2014 Link to this post

    Hello Ian,

    Let me update you with the recent changes regarding the RadTreeView control.

    During the last year we did some improvements in the built-in drag&drop logic of the control. Until now the control supported two drag drop managers to handle the corresponding commands through the attached property telerik:TreeViewSettings.DragDropExecutionMode, which allows users to switch between both managers. The New setting corresponds to the DragDropManager while the Legacy setting turns on the obsolete RadDragAndDropManager.
    In our latest official release (Q2 2014) the default setting of the attached property is New. This means that by default the DragDropManager will be activated. 

    You might tweak what gets visualized when you DragDrop via several properties we provided (you might find more information about them in our documentation). What I suggest is that you turn off the DragPreview Visibility and leave only the DragPreviewLine and DragTooltip:

    <telerik:RadTreeView IsLineEnabled="True" telerik:TreeViewSettings.DragDropExecutionMode="New"
                                                     Width="250" IsRootLinesEnabled="True"      HorizontalContentAlignment="Stretch"

    I attached a sample image demonstrating the result. Let me know how this works for you and whether you need any further customization.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top