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

TouchMode and Drag/Drop

0 Answers 115 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas LEBRUN
Top achievements
Rank 1
Thomas LEBRUN asked on 15 Jan 2014, 10:19 AM

Hi,

On my application, I'm using a GridView to display some data that I want to drag and drop to ListBox.
The drag and drop operations works fine but when I activated the Windows8Touch theme, I see some problems:
1) I see 1 or two circles when I keep the mouse pressed (or when the user touch the GridView): how can I remove this circles ?
2) To initiate my drag and drop to Listbox, I use the TouchMove event with this code:

var point = e.GetTouchPoint(datagrid).Position;
var element = datagrid.InputHitTest(pointas FrameworkElement;
if (element != null)
{
    var clientVm = element.DataContext as ClientViewModel;
    if (clientVm != null)
    {
        datagrid.CaptureTouch(e.TouchDevice);
 
        DragDropEffects dropEffect = DragDrop.DoDragDrop(datagridclientVmDragDropEffects.Move);
    }
}


On the touch move, i get the item under the touch point and I initiate my drag/drop. I do this because, otherwise, I need to select an item to be able to drop it (and I dont want to select an item, I just want to drag/drop the item I want).
But with that code, I'm no longer able to use the touch event to scroll on the GridView (as soon as I try, the component think I want to perform a Drag/drop operation).

How to solve this 2 problems ?

Thanks!

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Thomas LEBRUN
Top achievements
Rank 1
Share this question
or