Drag & Drop in WPF - c#

I am looking for WPF MVVM solution to drag and drop within as well as accross different listboxes.
Drag and Dropping Within Listboxes would update the sequence or Order.
I came across the Gong Soloution one which unfornately does not support both.
Also dragging something off (into nowhere) a listbox would remove the item would be really nice to have.

I would highly recommend looking into Bea Stollnitz's article on Drag/Drop. If her drag/drop code doesn't do what you need, it is very easy to add on to

Related

Drag and Drop with WPF ListBox

I have two ListBox in WPF application. One is the source second is the destination. I took the help from the article http://dotnetslackers.com/ADO_NET/re-191632_Generic_WPF_Drag_and_Drop_Adorner.aspx
Now I have managed to perform the drag and drop.
Now I have one feature to implement in which if we drop any item over an existing one, it will replace the existing item with the current dragged item.
Please guide.
You may want to look at Gong Solutions Drag/Drop for WPF, the guide it uses an adorner and should be able to show you how to remove the old item and add a new one, as #kenny suggested.

What is drag and drop as in "moving stuff around with a mouse" called as opposed to drag and drop as in data transfer?

I'm trying to implement drag and drop in C# and Java in order to allow the user to move visual elements around with the mouse but all I'm finding on Google are tutorials about data transfer and copy paste. What would be better search terms?
http://www.java-tips.org/java-se-tips/javax.swing/how-to-implement-drag-drop-functionality-in-your-applic.html
OR
http://www.javaworld.com/javaworld/jw-03-1999/jw-03-dragndrop.html?page=1
And search terms on google you can use: drag drop component GUI java
Bests
two Goodle searches to use, many useful results in first page of both.
"winforms drag and drop example"
"swing drag and drop example"

Winforms -> Visualize dragged item for Drag & Drop

I'd like to achieve the following and was looking for a sample/tutorial but couldn't really find anything:
I have C# Winforms application, which has multiple Forms within the same process. I'd like to be able to drag & drop items within and between forms and would like to provide some custom painted visualization of the item being dragged.
For example, my IM app shows the effect that I'd like to achieve:
Thanks,
Tom
You actually physically have to drag a control with the mouse.
For example: http://blogs.msdn.com/b/adamroot/archive/2008/02/19/shell-style-drag-and-drop-in-net-wpf-and-winforms.aspx

Drag and Drop control for Silverlight

Recently I needed to add drag & drop functionality to a Silverlight application. Can anyone recommend a good drag & drop control?
I created a Drag/Drop controller that I think works really well. I have been using this technique for a while, and I have been very happy with it.
http://houseofbilz.com/archive/2009/02/10/drag-and-drop-with-silverlight.aspx
Here is a link to the best one I have found so far: http://nickssoftwareblog.com/2008/10/07/silverlight-20-in-examples-part-drag-and-drop-inside-out/
The code is available as a download from the blog post, although you have to rename it to a .zip: http://nickssoftwareblog.files.wordpress.com/2008/10/genericdragdropzip.doc
You can try Blacklight Controls which have a really neat drag-dock panel control. Here's a link to a blog describing how it works.
I recommend the Silverlight Toolkit for dragging and dropping elements within the same application.
It already has been updated for Silverlight 5.
I am guessing you have already found a solution by now. But here is a solution I wrote and am currently using which is very flexible and easy to use: http://sl4dragdrop.codeplex.com/
It works on SL5 very well, all you have to do is add dependency properties on the items or itemscontrol on which you want to enable dragging or dropping.
By default, that is enough. But if you want to customize parts of drag/drop, it gives you interfaces to implement that can control things like Element to drag, Which element to drag from, What image to show while dragging etc.
I have recently refined it a bit and will be posting an update soon after some more testing.

Free advanced dropdown list control (Windows Forms .Net)

I'm looking for a free advanced dropdown list control. Basically something that provides a dropdown list which can have icons, and multiple bits of text per entry (preferably one large bit of text and then a smaller bit of text underneath).
Anyone know of such a control? I've had a look but can't seem to find one.
If I can't find it I spose I'll have to create it myself. I've done a bit with custom controls but I'm not really sure how I'd go about this...how would one take a ComboBox or something but make each entry completely graphically customisable?
Any links to controls, or hints on how to create one would be greatly appreciated.
it's not a drop down list, but I think you can use the knowledge here to do the same thing
I haven't found anything on the free side of WinForms that lets you do this. If you have green fields, however, WPF gives you what you're looking for out of the box.
Check out Krypton Toolkit which is free.

Categories

Resources