This question is locked. New answers and comments are not allowed.
Hi,
In our application we are using Drag&Drop operation between RadTreeView and ListView. The ListView contains some GuidLines, to which dragged elements must be snapped. In order to determine that, we need to know the exact X and Y of the left upper corner of dragged item.
To achieve that, we calculate the current drag point relative to the listView:
Everything worked fine in version 2011.3.1205.1040,
After migrating to 2012.3.725.1050 SL5 controls calculating the mouse position relative to dragged element (the 2nd code snippet).
The method TransfromToVisual returns always the same (invalid) values, no matter on which visual element the method is executed on.
Is there anything changed with placing the dragged element in the current visual tree?
Is there any way to get the mouse position relative to dragged element?
Thank You for Your help,
Best regards
In our application we are using Drag&Drop operation between RadTreeView and ListView. The ListView contains some GuidLines, to which dragged elements must be snapped. In order to determine that, we need to know the exact X and Y of the left upper corner of dragged item.
To achieve that, we calculate the current drag point relative to the listView:
p = transf.Transform(e.Options.CurrentDragPoint);
and the the point relative to dragged element (to get the location of mouse cursor relative to left upper corner of dragged element):elem = cue.ItemContainerGenerator.ContainerFromItem(cue.Items[0]) <span style=
"color:blue;"
>
as
</span> <span style=
"color:#2b91af;"
>FrameworkElement</span>;
<span style=
"color:blue;"
>
if
</span> (elem != <span style=
"color:blue;"
>
null
</span>)
{
visualRoot = GetVisualRoot(elem);
transf = visualRoot.TransformToVisual(elem);
pointOnDraggedItem = transf.Transform(e.Options.CurrentDragPoint);
}
Everything worked fine in version 2011.3.1205.1040,
After migrating to 2012.3.725.1050 SL5 controls calculating the mouse position relative to dragged element (the 2nd code snippet).
The method TransfromToVisual returns always the same (invalid) values, no matter on which visual element the method is executed on.
Is there anything changed with placing the dragged element in the current visual tree?
Is there any way to get the mouse position relative to dragged element?
Thank You for Your help,
Best regards