wpf using a windows form - wpf

I have a windows form that handles drag and drop of images just fine.Because I cannot find a way to do this in WPF can I add the form to a page and will the drag and drop still work? The images being dragged are from outside of app.
Thanks, Betsy

You can use a WindowsFormsHost in WPF to host Windows Forms controls. This will meet your requirements. Otherwise, take a look at Drag & Drop in WPF. This is fairly easy to implement.

Related

Drag and Drop/Reorder items in wrap panel?

I have a need to create an interaction in wrap panel to allow drag and drop functionality of items. I generate content in wrap panel dynamically with XMLDataprovider. I was not able to find any similar interaction online. How can this be achieved?
Check out the work done by Martin Grayson. It is an open source project on CodePlex titled Blacklight. There should be both an SL version and WPF version doing what you need to do via the Drag Dock Panel, with source available to get a better understanding on how it is implemented.
To see the sample from above, click WPF then click Drag Dock Panel on the lower left.
EDIT: It appears that default WPF support was stripped in 4.3, however jump back to 4.2 and both the binaries and source have their respective WPF offerings.

Silverlight 4 Drag and Drop Alternatives

I want to add the ability to drag a user control from one part of a Silverlight 4 page onto another user control on the same page (not talking about the new Silverlight 4 ability to drag a file from the OS onto the page).
What approach is most straightforward? What approach offers the most flexibility?
Here are some alternatives I found so far
SO drag-and-drop-control-for-silverlight. Same question but answers apply to SL 2.
Alex van Beek's DragManager. Written for SL3.
Silverlight Drag Drop. Also written for SL3.
I can't compare all of the options you've listed but if I wanted to implement control to control drag drop feature I would the DragDrop and the DragDropTarget classes from the Silveright Toolkit. Its the only DragDrop framework I know of that has been refreshed for SL4 and if you already use elements from the Toolkit then that would be a natural solution.

Silverlight Toolkit TreeView Drag and Drop

Does any know how to implement drag and drop in the silverlight toolkit's treeview?
I saw the drag and drop manager for silverlight but supposedly you can put containers around the items you want to drag and drop but I wonder how I would do this on another treeviewitem exactly?
Maybe there is a better way or custom way? Thanks!
The Silverlight Toolkit October (09) release (http://silverlight.codeplex.com/) has added support for drag and drop.
There is a great walk though of the new feature here: http://themechanicalbride.blogspot.com/2009/08/new-with-silverlight-toolkit-drag-and.html
One method that should work is using Telerik controls.
First download the telerik controls then add a reference to Telerik.Windows.Controls; that will allow you to use the IsDragnDropEnable property for the source treeview and the .AllowDrop for the Targeted TreeView

Image drag and drop in wpf application

I want to drag and drop an image on wpf application form. Can anyone provide me the code and other links for that?
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).

Creating a winforms app that allows drag and dropping of custom 'widgets'

I want to create a winforms application, this application will be similiar to the vs.net winforms designer (in certain aspects).
Basically it is going to be a blank page, where the user can drag and drop a bunch of 'widget's onto the screen. The widgets are basically custom images that I will create, that the user can resize, and it has some text on it by default which the user can double click on it to change the text.
Is this doable in winforms? If yes, what are the key aspects that I have to learn?
This is pretty easy to do in WinForms. Check out basic drag and drop. It's targeted toward 2.0. You'll use the DoDragDrop() method and capture data in drag and drop events. It requires some verbosity, but it gets the job done.
If you're keen on using WPF, take a look at MSDN's topic.

Resources