drag-and-drop

Reorder bindable listview by drag and drop using UWP

梦想与她 提交于 2019-12-13 17:30:59
问题 I'm trying to reorder ListView by drag and drop,it work with me while am using static items, but when I bind the data using itemsSorce the drag work fine but i can't drop the item this is my code C#: lstSrvMenu.ItemsSource = Menue.MainItems.Where(m => int.Parse(m.GroupID) > 0); XAML: <ListView Name="lstSrvMenu" Margin="0,40,0,0" AllowDrop="True" CanDragItems="True" CanReorderItems="True" IsSwipeEnabled="true"> <ListView.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding GroupTDesc}"

How to enable UIDragInteraction on Custom UIViews for iPhone

你离开我真会死。 提交于 2019-12-13 15:18:07
问题 I've been trying to use Apple's new API to enable Drag interactions on Custom UIViews. I've managed to make it work when testing using iPad, but when I run the same app in my iPhone 7 - ios 11 beta 3, I'm not able to drag my custom UIViews. I've noticed that we need to enable drag interaction when using in UICollectionView and UITableViews collectionView.dragInteractionEnabled = true tableView.dragInteractionEnabled = true but I can't manage to find anything in the documentation or anywhere

d3 v4 drag and drop with TypeScript

◇◆丶佛笑我妖孽 提交于 2019-12-13 15:04:57
问题 I am using the D3 library v4 and Angular2 and I want to make a drag and drop of svg elements. I have a code: item.call( d3.drag() .on("start", dragStarted) .on("drag", dragged) .on("end", dragEnded) ); and function dragStarted(d) { d3.select(this).raise().classed("active", true); } function dragged(d) { d3.select(this).attr("cx", d.x = d3.event.x).attr("cy", d.y = d3.event.y); } function dragEnded(d) { d3.select(this).classed("active", false); } I get this error: TS2345: Argument of type

Snap.svg how to get what element we are dragging over

梦想的初衷 提交于 2019-12-13 14:42:37
问题 I am using Snap.svg library and doing some drag & drop. My question is how do i get id of element that i am dragging over. I am trying to implement drag and drop and only selected areas are valid drop targets. I do not know how to check upon dragend what element is underneath my drag. This is from documentation: Element.drag(onmove, onstart, onend, [mcontext], [scontext], [econtext]) When element is dragged over another element drag.over.id fires as well How do i listen for drag.over.id? My

Enable drop just for specific targets in Swing

点点圈 提交于 2019-12-13 14:25:55
问题 I'm trying to implement drag & drop in java with two JList instances. The basic flow works fine. However, when I'm dragging a string from one list, I want to restrict the drop target only for the second list. I noticed that when I'm dragging a string from one list to my desktop so it creates a file containing this string. Is there any way to avoid such situations? public class SampleDnD extends JFrame{ public static void main(String[] args) { new SampleDnD(); } /** * new form of frame sample

QListWidget drag and drop items disappearing from list on Symbian

核能气质少年 提交于 2019-12-13 12:34:46
问题 I'm having trouble implementing a QListWidget with custom items that can be reordered by dragging and dropping. The problem is when I make a fast double click (a very short drag&drop) on an item, the item sometimes disappears from the QListWidget. This is the constructor for my Widget: ListPopisiDragDrop::ListPopisiDragDrop(QWidget *parent) : QListWidget(parent) { setSelectionMode(QAbstractItemView::SingleSelection); setDragEnabled(true); viewport()->setAcceptDrops(true); setDefaultDropAction

I want to drag an image from a Silverlight UIElement and drop it on the users Desktop or Windows Explorer

不打扰是莪最后的温柔 提交于 2019-12-13 12:06:41
问题 I have a Silverlight control containing an image. I want the user to be able to drag the image out of the Silverlight application and drop it anywhere they would be able to drop an image. For example, to the Desktop or to a PowerPoint slide or Word document. Everything that I have read thus far says it cannot be done but I find that hard to believe. I'm very new to Silverlight and RIA development so any help would be much appreciated. Below is the code sample in my WinForm Form but the drag

Android - Constrain Drag and Drop to a Bounding Box

♀尐吖头ヾ 提交于 2019-12-13 12:00:06
问题 The default behavior of drag and drop on Android apparently allows the DragShadow to be dragged anywhere on the screen. I'd like to limit the area in which it can be dragged - either to a specified bounding box, or to a the bounds of a particular view. I see that I can monitor the drag location with onInterceptTouchEvent, but I don't see any way to modify the drag location. Has anyone done this successfully? EDIT: Since I got no answers here, and never did find any other suitable answer, I

How to move element anywhere inside parent container with drag and drop in Flutter?

元气小坏坏 提交于 2019-12-13 11:36:20
问题 I'm using the Draggable widget in Flutter, and I want to move my element anywhere inside a parent widget. I tried the dragtarget widget, but I couldn't set it to my parent widget. I also tried the onDraggableCanceled method of the Draggable widget for getting the offset, and applied it for the new offset of the element, but it gives me the offset from the device, not from the parent container. So, what is the right way of doing this? 回答1: Just ran into the same problem working on a drag-and

Drag and drop multiple files into javaFX

☆樱花仙子☆ 提交于 2019-12-13 11:12:28
问题 I'm pretty new to Java. I'm building a samll app to help in my normal work, basically to process several files text files and add up the number of text symbols contained by those files. I would like to understand how to drop multiple files into a javaFX scene, since handle(DragEvent event) accepts only one file. 回答1: You can clearly accept multiple files in a DragEvent . The following example displays the file names dropped to the scene: @Override public void start(Stage primaryStage) { Text