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

DragArrow Start Position

4 Answers 60 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Tracey
Top achievements
Rank 1
Tracey asked on 06 Jul 2011, 04:24 PM
Hi

How does the drag arrow work out where to start from. I am getting a gap between where I start dragging and where the drag arrow actually appears as shown in this Screen shot

I am generating the arrow using the following
private void OnDragQuery(object sender, DragDropQueryEventArgs e)
 {
                 // draw the arrow
                if (e.Options.Status == DragStatus.DragQuery)
                {
                    e.QueryResult = true;
                    e.Handled = true;
                    var arrowCue = RadDragAndDropManager.GenerateArrowCue();
                    arrowCue.Background = new SolidColorBrush(ColourFormat.GetColourFromHex("#FFCC0000"));
                    arrowCue.BorderBrush = new SolidColorBrush(ColourFormat.GetColourFromHex("#FFCC0000"));
                    e.Options.ArrowCue = arrowCue;
                }
 }

4 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 11 Jul 2011, 04:33 PM
Hi Tracey,

I have tested the issue you reported on our demos, but still I was not able to reproduce it. Are you able to get that behavior on this example ? Is there anything more specific that you do ? Generally, any relevant information or sample project will be helpful.
 

Greetings,
Maya
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Tracey
Top achievements
Rank 1
answered on 21 Jul 2011, 10:29 AM
Hi

Yes I get the issue on the demo. For example if you start dragging the "Large Collider C.E.R.N" item to the right by clicking the N, the arrow doesn't start from the N there is a gap of roughly 30 pixels down and to the right.

Is there a way of setting the drag arrow so that it starts being drawn where you click?

Many Thanks
Tracey
0
Accepted
Tsvyatko
Telerik team
answered on 26 Jul 2011, 04:41 PM
Hi Tracey,

 You can remove this space be setting 0 padding to drag arrow:

args.Options.ArrowCue = RadDragAndDropManager.GenerateArrowCue();
args.Options.ArrowCue.Padding = new Thickness(0);

I have attached project demonstrating the idea as well. Let us know if you have any further questions.

All the best,
Tsvyatko
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Tracey
Top achievements
Rank 1
answered on 27 Jul 2011, 08:19 AM
That's it! Thank you very much
Tags
DragAndDrop
Asked by
Tracey
Top achievements
Rank 1
Answers by
Maya
Telerik team
Tracey
Top achievements
Rank 1
Tsvyatko
Telerik team
Share this question
or