Drag and Drop/Reorder items in wrap panel? - wpf

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.

Related

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.

How to create a control like Solution Explorer in Visual Studio?

I want to create control that seems and works like the Solution Explorer of Visual Studio.
I mean not the functionality of solution explorer, the control should be seems like that control. That means, server explorer, toolbox, error List,... All these controls will pop-out when we put mouse and pop-in when we leave. We can lock and unlock those controls also.
So can anyone help me, to get the solution for this problem.
Thanks!!!!!!!!!!!
I am assuming you are using C#/VB.NET for development. The dockpanel suite will provide a docking framework for an application. Basically in terms of dockpanel, it is the forms which can be docked on the application using drag and drop like visual studio.
So create a treeview control in the form and dock it to the parent. You can populate the treeview control based on file directories or any specific needs of your project. Please note in dockpanel you create a form by not inheriting from Form class but from DockContent class. Documentation will give you more insight of how to create applications. It has a good example along with the source code in which it simulates the all the visual studio panes. It also provides and option to save the position of various docks which can act as a user preference. For eg, you may like to position solution explorer on left side whereas i may want it on right side. this get stored in a conf file which gets read next time when you start the application.
Incase you using MFC, then visual studio 2008 SP1 provides you with docking framwork and within that use the treeview control.
XAML also provides a docking framework. But i am not sure, you need to verify.
Win32 API does not have any native docking framework.

Silverlight resizable container by mouse

Just checking to see if a free control with the following feature is available before I go build one.
I'm looking for a container that contains grips in which I can drag and re-size, much like a window.
Thank you,
There is a FloatableWindow control available on CodePlex, which is basically the Silverlight ChildWindow refactored to allow for non-modal use. Supports both dragging and resizing.
http://floatablewindow.codeplex.com/
This might not be exactly what you are looking for, but take a look at Blacklight contols.
Interactive Controls -> Drag Drop Panel
http://mightymeaty.members.winisp.net/blacklight.silverlight/

How to create a "drag target line" in a winforms listbox that shows whether the drop source is being dropped before or after the drop target

I have a user control that is hosting a winforms listbox. I am re-sorting items in the list using drag and drop. I realized that I need a drag "target line" that shows whether I am dropping before or after a target.
Any suggestions. I am open to suggestions. I am not wed to the listbox. I can use another winforms control (the lighter the better) and I am also licensed for winforms telerik controls (a couple of version back). RadListBox does not do the data binding to my biz object correctly so I went with winforms version. But maybe another rad control would give me this out of the box.
For the record, my preference is to stick with the winforms listbox if it can work.
If I need to implement this behaviour myself does anyone have code samples or suggestions on how to do it. I would not have a clue on where to start?
Check out how one person provided a visual cue for where a drop operation will take place in a ListBox:
Drag-and-Drop ListBox
See his VisualCue class.
I think you might be able to just use a ListView for this instead of a ListBox.

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

Resources