N00bie needs some help

Oct 16, 2009 at 1:41 AM
Edited Oct 16, 2009 at 2:00 AM



Firstly thank you for this great tool.... its just what I was looking for.


However I am relatively new to all of this and was wondering how to I go about installing the Drag and Drop controls? Can I install them in the toolbox in VisualStudio? I tried adding them through using the binary but it fails.


Any help with getting me started is very much appreciated and hopefully it will help others too.




PS - This is what I get when I try to add the dll as a control in VS2008.


"Could not load file or assembly "System.Windows"

Oct 16, 2009 at 5:21 AM

ok guys I sorted it out....


I had to add the control under the silverlight stuff... silly me.



Oct 16, 2009 at 11:12 AM

As a reference, I'm going to add what I replied to the topic starter by mail - just in case anyone else has the same question :-)


"All you need to do to start using it is referencing the Drag Drop assembly in your Silverlight project.  From that moment on, you can use the DragSource and DropTarget controls in your projects (as far as I know, you should be able to add them to the toolbox by dragging the assembly to it, but I never really tried it that way). 


After you’ve added a reference to the assembly in your project, you can use them like this:


In code behind:

-       Import the namespace by adding a “using” directive to the top of your code behind file to import the drag drop namespace

-       Now you can use them just as you would use any control, eg: “DragSource myDragSource = new DragSource()” et cetera



-       Import the namespace by adding a “xmlns:dragdrop=”thedragdropassembly”” statement to the top of your UserControl

-       Now you can use them just as you would use any control, eg: “<DropTarget x:Name=”myDropTarget” …> </DropTarget>”


One of the easiest ways to learn how to use these controls is by having a look at the sample application – source code for this is included in the source code download.


Hope this helps!


Oct 17, 2009 at 4:07 AM

Thanks Kevin,

Your answers were spot on.