drag-and-drop

Why doesn't WPF Canvas alow drop?

爷,独闯天下 提交于 2019-12-19 17:37:47
问题 I have the following XAML for the main window: <Window x:Class="ImageViewer.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="398" Width="434"> <Grid> <Canvas AllowDrop="True" /> </Grid> </Window> But when I try to drag a file to the window, drop is not allowed. When Canvas is changed to ListBox, everything works perfectly. How can the code be changed to allow drop to canvas? 回答1: By

Drag and drop listview C#

做~自己de王妃 提交于 2019-12-19 11:49:16
问题 Hi how to I enable drag event handler when I double click on the listview? This is what I get after double-clicking on the listview private void listView1(object sender, EventArgs e) However, I want it to be private void listView(object sender,DragEventArgs e) How to I do it..? I have tried many way such as: private void Form_Load(object sender, EventArgs e) { // Enable drag and drop for this form // (this can also be applied to any controls) this.AllowDrop = true; // Add event handlers for

Raphael- Detect overlapped elements when drag and drop

青春壹個敷衍的年華 提交于 2019-12-19 11:35:40
问题 I'm trying to get element by drag and drop another element. I have for example 2 circles: c1 and c2. What i want to do is : if i drop c2 above c1 hence they are overlapped(not entirely necessary), i can get circle c1 (ex:id, title... etc). http://jsfiddle.net/Tomen/LYjnV/1/ Is there a way to do it? 回答1: I'm not sure if you want the moving element that collides, or the static one that is collided with - so I'll give both. (it sounds like you want the static one, but it is this one which

jquery droppable -> avoid multiple drops of the same object

断了今生、忘了曾经 提交于 2019-12-19 10:25:07
问题 I have a container with different draggable -elements and there is a list of some "target" divs, where the user can drop the draggable elements. Example: Imagine, you have a list of "tags" (House,Computer,Car,..) and a list of some documents as target (all documents are part of the div <div id="doclist"> ). So the target is to assign the "tags" to the document using drag & drop. By the way, every tag-Div has an unique id ( <div id="e34a568b2"> ) Code for making the "tags" draggable: $('

JsTree with dnd plugin, always copy

末鹿安然 提交于 2019-12-19 09:39:47
问题 I have 2 trees using jsTree and dnd plugin. I want that each drag operation to be a copy instead of a move. There is a "copy_modifier" which works Ok when pressing a modifier key, but I want copy to be the default behavior without the modifier. Any ideas? Thanks, Adrian 回答1: Found a solution on http://groups.google.com/group/jstree I added the following section when configuring jsTree: "crrm": { "move": { "always_copy": "multitree" } } Hope this helps, Adrian 回答2: Adrian's solution won't work

Cannot drag and drop to debugged-application run from a privileged-run Visual Studio 2010

孤者浪人 提交于 2019-12-19 05:37:29
问题 I'm debugging my application which has drag-n-drop features in Visual Studio 2010. I have to run the IDE in privileged mode since some of my project required so. My problem: I can drag-drop when run the .exe file normally (run from Windows Explorer (WE)) but when debugging in VS2010 I cannot do drag-dropping between my app and WE. I tried to open WE in privileged mode but still cannot debug either. Do you have the same problem? If you do, do you have any work-around for it? Please share. 回答1:

javascript collision detection between drawable circles

China☆狼群 提交于 2019-12-19 00:40:24
问题 First of all please don't be too critical with my English. I'm not a native speaker. I hope I can explain myself never the less! Further more, I read that I should show I made some efforts to solve the given problem myself. To show this my post became relatively long. What I want to do: I am new (three weeks) to javascript and I try to build a pool billiard table via html5 canvas and javascript. In the end a user should be able to present a certain playing situation on the virtual pool tabe

Rearrange items of DataView with Drag and Drop

自古美人都是妖i 提交于 2019-12-18 18:20:55
问题 I have an ExtJS DataView with following template: <ul> <tpl for="."> <li class="report-field" id="{listId}"> {[this.getReorderLinks(values, xindex, xcount)]} <span class="field-title small" data-qtip="{displayName}">{displayName}</span> <i class="field-remove" title="' + deleteLabel + '"></i> </li> </tpl> </ul> Which makes each list of items look like this: Where user can click on different icons and perform related action, moving up/down in order and remove. Note that these items are added

Image drag and drop in wpf application

▼魔方 西西 提交于 2019-12-18 17:27:49
问题 I want to drag and drop an image on wpf application form. Can anyone provide me the code and other links for that? 回答1: If you want to D&D within a single WPF application; then this code should get you going: Drag and Drop within WPF If you want to D&D between WPF applications, or between another non-WPF application you've got some options, but probably the easiest is to use a bitmap transfer (it takes a bit more code, so let me know and I'll publish it). 回答2: Does this drag and drop library

How to drag&drop elements onto a calendar with angular directives only

末鹿安然 提交于 2019-12-18 17:26:39
问题 I am trying to implement a drag&drop calendar with angular directives. The calendar uses the ui-calendar (https://github.com/angular-ui/ui-calendar), a complete AngularJS directive for the Arshaw FullCalendar. The drag&drop of the element onto the calendar is powered by angular-dragdrop (https://github.com/codef0rmer/angular-dragdrop). Here is my try in the folder demo/ui-calendar/demo , but no event is ever fired when i drop an element onto the calendar... The html is as simple as following: