Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

DragDropMode=-Deferred DragVisual Template and offset

$
0
0

What is the recommended way to set the DragVisual to a template for Deferred drag and drop?
I would also like to change the DragVisual offset for all deferred drags of a Title Bar so that it is X centered at the cursor even if the drag click was on the right side of the Title Bar (the tab drag offset is fine the way it is).

It looks like there are two DragVisuals - one for RadPane and one for RadPaneHeader. 

I have set my title and header templates to a template that only includes an image (icon). 

   Pane.TitleTemplate = myTemplate;       
   Pane.HeaderTemplate = myTemplate;

When dragging, the DragVisual / indicator is empty because it is not using my template, it is getting a string for the Title. 
I would like it to use the same template. 

I have not found a way to accomplish this.

I have tried DragDropManager.AddDragInitializeHandler(PaneGroup, OnDragInitialize); but it does not call my handler. Even if it did, there are issues with the RadPaneHeader not being exposed to allow me to call AddDragInitializeHandler(PaneHeader, OnDragInitialize).

I see that the OnDragInitialize methods are virtual. I considered creating classes to override them, but the LoadLayout / XML layout loader requires the classes to be named "RadPane". Also, I probably could not get the classes to use MyRadPaneHeader. 

I am compiling source, so changing the code is a viable option for me. Of course, a reliable method that does not require code changes would be OK too. 

If code changes are the easiest method,  having the code look for a HeaderTemplate or TitleTemplate (accordingly) and use it if found would be great. If not found, the current code could be used. Those code changes sound like something everyone would want - it seems logical to use the provided template instead of just a string.

If code changes are the way to go, some help on what code changes to make in RadPane and RadPaneHeader.OnDragInitialize would be greatly appreciated.  

Thank You,

Dean

 

 

 

 


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>