How to set touch drag and drop in Windows Universal Apps on Windows 10 Phone?

I successfully installed my Drag and Drop Grid with

<Grid x:Name="SourceGrid13" CanDrag="True" DragStarting="SourceGrid_DragStarting" Margin="0,20,0,0"> 

However, it does not drag onto Windows Phone (Windows 10) by touching. How to set it up?

Also, I assume that when I get the drag and drop of the grid, will the drop sequence be the same as with the mouse? This is my code:

  <ListView HorizontalAlignment="Center" AllowDrop="True" Drop="Image_Drop" DragEnter="TargetImage_DragEnter" DragLeave="TargetImage_DragLeave" CanDragItems="True" IsSwipeEnabled="True" MinHeight="124" Grid.Row="4" Grid.Column="1"> <Image Height="224"/> </ListView> 

Also on the tablet is difficult, but it will touch. Should I turn it on on my phone somewhere?

Now I think that touch can be turned off until a future update or actual release in Windows 10 on Windows Phone.

UPDATE Based on responses:

I set true for the ListView CanDragItems and IsSwipeEnabled, but that did not change anything. I applied a manipulation rectangle with some weird results. On the phone, I can drag the rectangle, but when I enter it into the ListViews list, it disappears. The following photos are shown:

Full Rect:

enter image description here

Drag it from the Framework element - it is dragged behind the View list.

enter image description here

On the desktop, the rectangle is dragged in front of the ListView, but after pulling it out of the original Framework element, it remains unavailable.

enter image description here

+6
source share
1 answer

All the necessary things for any manipulations with the touch screen are here out of the box. A simple example is a Rectangle on Canvas :

 <Canvas Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Rectangle Width="50" Height="50" Fill="Blue" RenderTransformOrigin="0.5,0.5" ManipulationDelta="Rectangle_ManipulationDelta" ManipulationMode="All"> <Rectangle.RenderTransform> <TranslateTransform x:Name="dragTranslation" /> </Rectangle.RenderTransform> </Rectangle> </Canvas> 

Minimum Processing Code:

 private void Rectangle_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e) { dragTranslation.X += e.Delta.Translation.X; dragTranslation.Y += e.Delta.Translation.Y; } 

Just drag any UIElement onto the Canvas onto the touch screens AND onto the desktop with the mouse. Grid drag and drop also works.

+6
source

All Articles