×

First time here?

You are looking at the most recent posts. You may also want to check out older archives. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS or email. Thank you for visiting!

One of the cool things I came across the in the October 2009 Silverlight Toolkit release was the addition of drag-n-drop targets for some of the core controls.  Now I know you are thinking great, another drag-n-drop useless control?!? and you’d be wrong.  I’m talking about things that make it easy to do do things like moving items from one list box to another, without writing code, but with it actually doing what you expect.

Let’s take the simplest example here: ListBox and moving items from one to another.  Using Expression Blend I’ve set up my XAML to be like this:

   1: <StackPanel Orientation="Horizontal" Margin="10">
   2:     <ListBox Width="200" Height="500" x:Name="FromBox" DisplayMemberPath="FullName"/>
   3:     <ListBox Width="200" Height="500" x:Name="ToBox" DisplayMemberPath="FullName"/>
   4: </StackPanel>

Behind the scenes I have a simple class which returns an ObservableCollection<Person> and binds the results to my FromBox.  Here’s the full simple class:

   1: using System.Collections.ObjectModel;
   2:  
   3: namespace SilverlightApplication105
   4: {
   5:     public class People
   6:     {
   7:         public static ObservableCollection<Person> GetListOfPeople()
   8:         {
   9:             ObservableCollection<Person> ppl = new ObservableCollection<Person>();
  10:             for (int i = 0; i < 15; i++)
  11:             {
  12:                 Person p = new Person() { Firstname = "First " + i.ToString(), Lastname = "Last " + i.ToString() };
  13:                 ppl.Add(p);
  14:             }
  15:             return ppl;
  16:         }
  17:     }
  18:  
  19:     public class Person
  20:     {
  21:         public string Firstname { get; set; }
  22:         public string Lastname { get; set; }
  23:         public string FullName
  24:         {
  25:             get
  26:             {
  27:                 return string.Concat(Firstname, " ", Lastname);
  28:             }
  29:         }
  30:     }
  31: }

And the code for my MainPage.xaml.cs:

   1: using System.Windows;
   2: using System.Windows.Controls;
   3:  
   4: namespace SilverlightApplication105
   5: {
   6:     public partial class MainPage : UserControl
   7:     {
   8:         public MainPage()
   9:         {
  10:             InitializeComponent();
  11:             Loaded += new RoutedEventHandler(MainPage_Loaded);
  12:         }
  13:  
  14:         void MainPage_Loaded(object sender, RoutedEventArgs e)
  15:         {
  16:             FromBox.ItemsSource = People.GetListOfPeople();
  17:         }
  18:     }
  19: }

Now I want to be able to drag an item from my FromBox to my ToBox.  I could do this in code, managing my index and moving things around, etc.  Or I can use something new from the toolkit!  Adding a reference in my Silverlight application to System.Windows.Controls.Toolkit, I then add two namespace declaration in my MainPage.xaml – here’s what the full XAML looks like now:

   1: <UserControl x:Class="SilverlightApplication105.MainPage"
   2:     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
   3:     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   4:     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
   5:     mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
   6:     xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
   7:     xmlns:mswindows="clr-namespace:Microsoft.Windows;assembly=System.Windows.Controls.Toolkit">
   8:     <Grid x:Name="LayoutRoot">
   9:         <StackPanel Orientation="Horizontal" Margin="10">
  10:             <ListBox Width="200" Height="500" x:Name="FromBox" DisplayMemberPath="FullName"/>
  11:             <ListBox Width="200" Height="500" x:Name="ToBox" DisplayMemberPath="FullName"/>
  12:         </StackPanel>
  13:     </Grid>
  14: </UserControl>

Notice the xmlns:toolkit and xmlns:mswindows in the declarations.  Now I simply wrap the ListBox controls inside a ListBoxDropTarget control:

   1: <StackPanel Orientation="Horizontal" Margin="10">
   2:     <toolkit:ListBoxDragDropTarget mswindows:DragDrop.AllowDrop="True">
   3:         <ListBox Width="200" Height="500" x:Name="FromBox" DisplayMemberPath="FullName"/>
   4:     </toolkit:ListBoxDragDropTarget>
   5:     <toolkit:ListBoxDragDropTarget mswindows:DragDrop.AllowDrop="True">
   6:         <ListBox Width="200" Height="500" x:Name="ToBox" DisplayMemberPath="FullName"/>
   7:     </toolkit:ListBoxDragDropTarget>
   8: </StackPanel>

And when I run the application I get drag-n-drop item functionality from one list to the other, complete with a semi-opaque decorator as I drag the item:

ListBoxDragDropTarget image sample

Cool.  As I drag one item, it moves to the other.  But this can do more.  What if I just wanted to re-order items within a single ListBox?  This can do it as well…after all the ListBox can be both a drag *and* drop target.  However this ListBoxDragDropTarget doesn’t work with virtualized panels (which the ListBox uses by default.  So to do this you’d have to alter your ListBox ItemsPanelTemplate to include a regular StackPanel like so:

   1: <toolkit:ListBoxDragDropTarget mswindows:DragDrop.AllowDrop="True">
   2:     <ListBox Width="200" Height="500" x:Name="FromBox" DisplayMemberPath="FullName">
   3:         <ListBox.ItemsPanel>
   4:             <ItemsPanelTemplate>
   5:                 <StackPanel/>
   6:             </ItemsPanelTemplate>
   7:         </ListBox.ItemsPanel>
   8:     </ListBox>
   9: </toolkit:ListBoxDragDropTarget>

And then you’d be able to reorder using the drag/drop behavior of your mouse:

reorder sample image

Very cool.  What’s great about this is that while I’m using simple text, you can use whatever DataTemplate you may have in your ListBox and the same functionality works…even if I added an image to my Person class and added that to the template, the functionality still works and looks great for the user:

complex template sample image

As you can see the template follows the drop.  And the drop target location doesn’t have to match the same data template!  I can have my binding in the FromBox be a complex data template, but in the ToBox only choose to bind to a single property of the class.  Nice.  Here’s an animated view of this working or click here for a live sample:

This isn’t just for ListBox elements either.  Here are the other implementations:

  • ListBoxDragDropTarget
  • TreeViewDragDropTarget
  • DataGridDragDropTarget
  • DataPointSeriesDragDropTarget

Check out Jafar’s post for some samples on the other implementations to see how helpful they can be.

So what do you think?  Good?  Hope this helps some of your scenarios with ease.  Go Toolkit!

UPDATE: Download my project I used above here.


This work is licensed under a Creative Commons Attribution By license.


10/19/2009 5:09 PM | # re: Silverlight Toolkit adds DragDrop targets!
Very timely Tim, this week I'm tasked with adding drag / drop re-ordering for a listbox.
10/19/2009 6:04 PM | # re: Silverlight Toolkit adds DragDrop targets!
This is really a very useful feature, thanks for explain how to use it.
Rachida
10/20/2009 4:04 AM | # re: Silverlight Toolkit adds DragDrop targets!
This example realy will help to all.And having a doubt about the can we add new flash movie into our aspx page by using silverlight technology?. I am not much aware of silverlight technology. if any one could you please send me the study things to my mail id. manikandan264@hotmail.com. Thanks in advance.
10/20/2009 7:50 AM | # re: Silverlight Toolkit adds DragDrop targets!
Sweet! I was just about to sit down and start hacking through complicated drag-n-drop code today, and here it is in a nutshell. I love Silverlight... thanks for the head's up Tim!
10/20/2009 9:18 AM | # re: Silverlight Toolkit adds DragDrop targets!
Michael - Yes Silverlight can communicate with Javascript. see: silverlight.net/.../html-browser-integration/
10/20/2009 10:05 AM | # re: Silverlight Toolkit adds DragDrop targets!
Nice!

Where can I download your sample code?

Thank you!
10/20/2009 12:22 PM | # re: Silverlight Toolkit adds DragDrop targets!
Cool, but adding 230k to my download for drag n drop is a bit much (adds system.reactive.dll, system.windows.controls.dll, and system.windows.controls.toolkit.dll to my xap)

Anyway I can reduce the payload?
10/20/2009 12:51 PM | # re: Silverlight Toolkit adds DragDrop targets!
Rune - the code is all up there -- I just don't have a download for it -- but if you use the XAML/code above you can reproduce it.

Martin -- yes, good point, as you add features, you're adding dependencies and as a developer we have to be aware of the trade-off of functionality versus benefits...that's an exercise for the developer.
10/20/2009 1:20 PM | # re: Silverlight Toolkit adds DragDrop targets!
Hi Tim,

Can you implement the drag and drop on to other controls such as a StackPanel or Grid? Or can you only use this for the listbox, treeview, datagrid, and datapointseries?
Gravatar
10/20/2009 9:43 PM | # re: Silverlight Toolkit adds DragDrop targets!
Hi

Really helpful post.
Can you please tell me how can I perform dragging and droping in such a way that only the snapshot of the slected item will be dragged i.e. the actual element will remain at the position it was previous to dragging. And the dropped snapshot will only contain its id and other information if needed of the actual element.
When this snapshot will be dropped, I will perform some action there using that id.

I need help badly... please help...Thanks in advance...

10/21/2009 5:50 AM | # re: Silverlight Toolkit adds DragDrop targets!
Tim, great tutorial.
I have installed new toolkit and as always new problems: mswindows:DragDrop.AllowDrop="True" throws the below exception:
The property 'AllowDrop' does not exist on the type 'ListBoxDragDropTarget' in the XML namespace 'clr-namespace:System.Windows;assembly=System.Windows.Controls'.

Any ideas? This is new development so there aren't many places to look for solutions. You are it.

Do I miss a Reference?

Thanks for your help in advance.
Gravatar
10/21/2009 6:35 AM | # re: Silverlight Toolkit adds DragDrop targets!
Hi

Really helpful post.
Can you please tell me how can I perform dragging and droping in such a way that only the snapshot of the slected item will be dragged i.e. the actual element will remain at the position it was previous to dragging. And the dropped snapshot will only contain its id and other information if needed of the actual element.
When this snapshot will be dropped, I will perform some action there using that id.

I need help badly... please help...Thanks in advance...
10/21/2009 7:04 AM | # re: Silverlight Toolkit adds DragDrop targets!
Since the new toolkit release now has theme support for chidWindows it would be great if you could get your FloatableWindow to use them. I really like the resizing functionality you added to you windows.
10/21/2009 8:07 AM | # re: Silverlight Toolkit adds DragDrop targets!
Got it fixed and working. I wish I new what fixed it exactly.... I have notices VS2008 not always refreshing references. Maybe that was it or I copied and pasted something wrong...
In any case - this is a great functionality.
10/21/2009 10:32 PM | # re: Silverlight Toolkit adds DragDrop targets!
You saved my day ! superb help thanks Lot
10/22/2009 9:35 PM | # re: Silverlight Toolkit adds DragDrop targets!
This isn't just good. This is fabulous!
Ever since I saw the Netflix Queue that allows drag and drop reordering I wanted to have my DataGrids that user-friendly. And now ... it's here. For free!
Absolutely fabulous!
10/23/2009 12:32 AM | # re: Silverlight Toolkit adds DragDrop targets!
Very nice tutorial.
I'm almost there but I'm facing a problem on the syntax to get the [image+description] example working.
You say :
"you can use whatever DataTemplate you may have in your ListBox... "

But whenever I try to insert something in the StackPanel (like below), my Silverlight page fails and goes blank :(

<toolkit:ListBoxDragDropTarget mswindows:DragDrop.AllowDrop="True">
<ListBox Width="200" Height="500" x:Name="FromBox" DisplayMemberPath="FullName">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel>
<!-- could insert an image here like your chair example -->
<TextBlock Text="{Binding Firstname}" FontSize="12" />
</StackPanel>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
</toolkit:ListBoxDragDropTarget>
10/23/2009 6:40 AM | # re: Silverlight Toolkit adds DragDrop targets!
Jerome - you are mixing Panel template and ItemTemplate together -- your TextBlock, Image would be in an Item Template
10/24/2009 6:47 AM | # re: Silverlight Toolkit adds DragDrop targets!
Hi,I am having the problem "Assembly 'System.Windows.Controls.Toolkit' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built." I have already downloaded the toolkit and installed it.And yet i am facing this problem.Can someone please help mi out.


Help is greatly appreciated
10/24/2009 11:24 AM | # re: Silverlight Toolkit adds DragDrop targets!
Sunny -- be sure to add a reference to that toolkit assembly in your project. Simply installing it doesn't do that...you have to tell your project you want to use it.
10/24/2009 9:42 PM | # re: Silverlight Toolkit adds DragDrop targets!
That fixed the problem.Thank You for your help.

I was also wondering if you could show how to place the datatemplate item in the listbox cause currently my listbox is not displaying the image associated to my person object
10/24/2009 10:06 PM | # re: Silverlight Toolkit adds DragDrop targets!
Sunny, the datatemplate for the listbox with the picture is basically a stackpanel with Image binding to the data that uses a BitmapImage as the type.
10/24/2009 10:22 PM | # re: Silverlight Toolkit adds DragDrop targets!
Currently on the person class, i have an attribute of type BitmapImage called picture with an image already assigned to it.

the listbox's itemsource has also been assigned to the observableCollection ppl

then the xaml portion of the code is as shown below,output is that the listbox only shows the firstname but not the image associated.:

<ListBox Width="200" Height="400" x:Name="fromBox">
<ListBox.ItemTemplate>
<DataTemplate>

<StackPanel Width="190" Height="50" Orientation="Horizontal">

<Image Source="{Binding Picture}" />
<TextBlock Text="{Binding Firstname}"/>

</StackPanel>

</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
10/24/2009 10:58 PM | # re: Silverlight Toolkit adds DragDrop targets!
thanks for the help i found the problem i accidently convertered the list of picture from bitmapimage type to image type before displaying the images.

Thanks once again for this tutorial couldnt have done started on my silverlight project without this.
10/25/2009 2:18 AM | # re: Silverlight Toolkit adds DragDrop targets!
This feature is very cool.
But need to be improved.
In my case i have place listbox wraped with ListBoxDragDropTarget in a child window and its not working but it is working fine if i am not using child window.

One thing i have notice that when i close my child window, mouse cursor shows the item i have dragged.

Is there any workaround?
10/27/2009 10:39 AM | # re: Silverlight Toolkit adds DragDrop targets!
I thought the toolkit changed its namespaces. I have talked with others and people seem to have issues here:

xmlns:mswindows="clr-namespace:Microsoft.Windows;assembly=System.Windows.Controls.Toolkit">

They get an error later on saying that AllowDrop is not in the namespace. Is the namespace for System.Windows.Controls.Toolkit really "Microsoft.Windows"??
10/27/2009 10:49 AM | # re: Silverlight Toolkit adds DragDrop targets!
THerman - notice above how I had to note that: mswindows:DragDrop.AllowDrop="True"

The AllowDrop is in the Microsoft.Windows namespace
10/28/2009 2:42 PM | # re: Silverlight Toolkit adds DragDrop targets!
Same issue as Sunny.

Here is what I have done:
- Installed SDK
- Added a Reference to System.Windows.Controls.Toolkit.dll (browsing to sdk path)
- Opened Toolbox items: Looked for ListBoxDragDropTarget and saw nothing, so did a browse to the DLL again and it still added nothing...

I still get the issue. I am using the Oct 09 version but do not even see ListBoxDragDropTarget as being available in the Silverlight Components under toolbox items. I am Network/Server guy so I am a complete dev newb. I have been working on getting this going for hours now and maybe it is something easy that I am missing.


I appreciate any help you can give me.

Thanks!
10/28/2009 4:16 PM | # re: Silverlight Toolkit adds DragDrop targets!
Thanx for the post... very nice.
This is one of the features I have been hoping for.

Will a listbox that is bound to a RIA Services Collection work? Currently I can drag from the bound listbox but not to it.

What I am after is the ability to manually sort as you mentioned when including the </stackpanel> in the template.

I am off to read what ObservableCollection does.
10/29/2009 5:37 AM | # re: Silverlight Toolkit adds DragDrop targets!
I think I got it. I believe I was adding the references in the wrong spot. Looking better now.

Thanks!
10/29/2009 7:29 AM | # re: Silverlight Toolkit adds DragDrop targets!
Hopefully this is the last question ... Everything runs without error but I see no data. Is there anything more specific that needs to be done besides the code outlined above. I will keep digging but as always any help would be appreciated.

Thanks again!
10/29/2009 10:05 AM | # re: Silverlight Toolkit adds DragDrop targets!
Ok, so maybe I just stop posting since I am stumbling across my own answers. A couple things.

- Originally was apparently adding a reference in the wrong spot.
- Noticed I was trying to do all of this under a new VB project instead of C#
- Namespace is case-sensative

So those are my notes if any other novices see this thread.

Later!
10/29/2009 10:25 AM | # re: Silverlight Toolkit adds DragDrop targets!
NateC/All -- I should have done this the first time, but I've updated my post to include a download to the quick project being demonstrated above (see last line in post for link above). Hope this helps!
10/29/2009 11:05 AM | # re: Silverlight Toolkit adds DragDrop targets!
Hey Tim,

Thank you for that! Sorry about all the questions, trying to elevate myself into the dev arena.

Thanks again!
10/29/2009 2:46 PM | # re: Silverlight Toolkit adds DragDrop targets!
Hi Tim!

Great post. Is it possible to drag and drop selected text from inside of a textbox to another control?

Thanks in advanced
11/4/2009 12:23 PM | # re: Silverlight Toolkit adds DragDrop targets!
Thanks Tim. This turned out to be extremely helpful.
Gravatar
11/5/2009 12:29 AM | # re: Silverlight Toolkit adds DragDrop targets!
why the reordering items within a DataGrid is not supported?
11/6/2009 7:29 PM | # re: Silverlight Toolkit adds DragDrop targets!
Hi Tim,

Great to see that the dev team got Drag & Drop capabilities enabled in Silverlight. The one item I see that I always seem to be bothered with is that the practical application of drag & drop, for easy reordering of items in a list, is not usually demo'd where it is bound to an Ordinal on the object in the list.

Any info that could better help someone out with this would be appreciated.
11/10/2009 12:19 PM | # re: Silverlight Toolkit adds DragDrop targets!
Hi Tim,

I have noticed that DragDropTargets are located in different dll's

- DataGridDragDropTarget are in --> System.Windows.Controls.Data.Toolkit"

- ListBoxDragDropTarget, TreeViewDragDropTarget are in --> System.Windows.Controls.Toolkit"

that requires two separate namespaces included.
1. xmlns:dataToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Toolkit"

2. xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"

11/16/2009 4:12 AM | # re: Silverlight Toolkit adds DragDrop targets!
Hi, I would like to Drag Datagrid Cell and Drop to some other cell in the same datagrid. Can any one provide some sample code to do so or some guide line to help with this?

Thanking you in anticipation.

Manish
11/22/2009 12:32 PM | # re: Silverlight Toolkit adds DragDrop targets!
Hi Tim, when using the feature, there is a significant delay and 'glitchiness' with many items are in the list. I tried this with 200, 500 and it becomes pretty unusable. Would you have any suggestions on how to decrease the delay?

Thanks!
Chris
12/10/2009 10:22 AM | # re: Silverlight Toolkit adds DragDrop targets!
As I was reading the comments on the page trying to find the answer to my question I found that someone had already asked the question but haven't gotten an answer so I will re-ask the question.

Is there a way to instead of moving an item from a source to a target but rather copy a source to a target? The reason I'm asking this is because I'm creating a site that has a list of data that will be dropped on other controls to reperesent the data in defferent ways. The data needs to stay in the source list.
12/11/2009 9:20 PM | # re: Silverlight Toolkit adds DragDrop targets!
Hi
Good Work.

I taken two listbox and two pages Then how to drag&drop from one page to another page give me exmple
Gravatar
1/13/2010 6:15 AM | # re: Silverlight Toolkit adds DragDrop targets!
Hi Tim,
great article! It was very helpful...

But using TreeViewDragDropTarget I faced some problems.

I have two treeview (source and target), nested in two different TreeViewDragDropTarget. I do not find a correct way to get the destination node where the source item is dragged.

Inside "Drop" event on target TreeViewDragDropTarget I can find the relative position (coordinates) of dropping point, but it is impossibile (at least for me) to get the related item.

Any idea?
Thanks
1/13/2010 2:53 PM | # re: Silverlight Toolkit adds DragDrop targets!
Amazing feature!
I´ve inserted in my site and it works nice.
Thanks Tim.
For me it was extremelly helpful.
1/19/2010 6:25 AM | # re: Silverlight Toolkit adds DragDrop targets!
Hi Tim,

i tried to use this in a popup(childwindow), but it doesn't work.
Is this possible?

Thanks
1/27/2010 6:53 AM | # re: Silverlight Toolkit adds DragDrop targets!
does not work on ChildWindow!
2/9/2010 10:20 PM | # re: Silverlight Toolkit adds DragDrop targets!
Hi Tim,
I was trying to apply drag drop my own "User Control" derived from class "UserControl". I am able to sort my Custom control in ListBox using

<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>

However when drag from one ListBox to another i get an error "Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError".

it be really great if you can show how to do drag drop if i replace my "Person" class with any "custom user control".

Thanks
3/2/2010 12:26 PM | # re: Silverlight Toolkit adds DragDrop targets!
Is your project file a 2010 project file? Can't seem to open with VWD 2008 Express edition. It says: "One or more projects in the solution could not be loaded for the following reasons: Project file has been moved, renamed, or is not on your computer"
3/18/2010 2:15 AM | # re: Silverlight Toolkit adds DragDrop targets!
Hello,
I wanted to add drag & drop effect for datagrid row.Please, update me if you have any solution.

Thankimg you.
5/6/2010 11:48 PM | # re: Silverlight Toolkit adds DragDrop targets!
Drag and Drop sanpshot is not able move in auto scrolled area.. horizontally

or can we hide the sanpshot of dragging element and change the color of gray selector line to other color..
6/21/2010 2:20 AM | # re: Silverlight Toolkit adds DragDrop targets!
can you please clarify my doubt
1.in my scanerio in "FromBox" should static components. that means when i m dragging comp from FromBox.that comp is also appear in the FROMBOX and also in TOBOX.
2.The TOBOX should be resize the component which ever i dragged from the FROMBOX.

Please give suggestions.because i searched so many web site. i couldn't get the result.
9/12/2010 3:53 AM | # re: Silverlight Toolkit adds DragDrop targets!
Great tutorial!

I have two pairs of ListBoxes set up for DragDrop. (This is in a Silverlight 4 Business sln, in VS 2010 if that makes any difference)

I want to be able to DragDrop between the ListBoxes within each pair (which works OK); but, prevent DragDrop between the two pairs.
That is, neither of the Pair 2 ListBoxes can Drop into either of the Pair 1 ListBoxes, and vice versa.

Do you have any advice on how to do this?
9/16/2010 11:22 PM | # re: Silverlight Toolkit adds DragDrop targets!
Hi all,
How can I disable or not allowed to drop some of items from "ToBox" to "FromBox".
Please help me.
1/5/2011 11:24 PM | # re: Silverlight Toolkit adds DragDrop targets!
I want to move items from ListBox 01 to ListBox 02, and similarly from LB 03 to LB 04.

Basically, I want the items to move only one way and not backwards. Has anybody done this ?
1/9/2011 8:54 PM | # re: Silverlight Toolkit adds DragDrop targets!
OH MY GOD!

Thanks, im lookinf for this have days.
I´ve inserted in my site and it works nice.
Thanks Tim.
For me it was extremelly helpful too
2/22/2011 9:26 AM | # re: Silverlight Toolkit adds DragDrop targets!
Nice setup. I had to convert it to Silverlight 4 to and take out the mswindows ref to make it work in my setup.
Am I missing answerbacks on how I tell where the item is dropping before I "accept" the drop?

--mike
6/14/2011 10:25 PM | # re: Silverlight Toolkit adds DragDrop targets!
Hi Tim,

This is an excellent feature. One question here, How would I know what Item was dragged and dropped to the destination ? (of course, I need this object If I want to explicitly change the source from where the control is loaded)
7/23/2011 5:03 PM | # re: Silverlight Toolkit adds DragDrop targets!
I think you do not need to put mswindows pref before AllowDrop attribute...
3/13/2012 7:24 AM | # re: Silverlight Toolkit adds DragDrop targets!
Great Article! I was wondering if you could use an ItemsControl for this as well. Everytime I try, it throws an error. Is there some code I need to update?

Thanks
11/13/2012 1:40 AM | # re: Silverlight Toolkit adds DragDrop targets!
Hi, these look excelent. Just what I am trying to achieve. However, is there a way of changing the list source to one of my document libraries. Can this be done in the tool pane rather than by hard coding? Thanks

 
Please add 8 and 1 and type the answer here:

DISCLAIMER:

The opinions/content expressed on this blog are provided "ASIS" with no warranties and are my own personal opinions/content (unless otherwise noted) and do not represent my employer's view in any way.