title: How do I build a WPF application where I can drag and drop a user control between windows?
body: <p>I'm building a simple Todo List application where I want to be able to have multiple lists floating around my desktop that I can label and manage tasks in.</p>
  <p>The relevant UIElements in my app are:</p>
  <p>Window1 (Window)
  TodoList (User Control)
  TodoStackCard (User Control)</p>
  <p>Window1 looks like this:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;Window x:Class=&quot;TaskHole.App.Window1&quot;
      xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
      xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
      xmlns:t=&quot;clr-namespace:TaskHole.App.Controls&quot;
      xmlns:tcc=&quot;clr-namespace:TaskHole.CustomControls&quot;
      Title=&quot;Window1&quot; Width=&quot;500&quot; Height=&quot;500&quot; Background=&quot;Transparent&quot; WindowStyle=&quot;None&quot; AllowsTransparency=&quot;True&quot; &gt;
      &lt;Canvas Name=&quot;maincanvas&quot; Width=&quot;500&quot; Height=&quot;500&quot; VerticalAlignment=&quot;Stretch&quot; HorizontalAlignment=&quot;Stretch&quot;&gt;
          &lt;ResizeGrip SizeChanged=&quot;ResizeGrip_SizeChanged&quot; /&gt;
          &lt;t:TodoList Canvas.Top=&quot;0&quot; Canvas.Left=&quot;0&quot; MinWidth=&quot;30&quot; Width=&quot;50&quot; Height=&quot;500&quot; x:Name=&quot;todoList&quot; TaskHover=&quot;todoList_TaskHover&quot; HorizontalAlignment=&quot;Stretch&quot; VerticalAlignment=&quot;Stretch&quot;/&gt;
      &lt;/Canvas&gt;
  &lt;/Window&gt;
  </code></pre>
  <p>TodoList looks like this:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;UserControl x:Class=&quot;TaskHole.App.Controls.TodoList&quot;
          xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
          xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
          xmlns:t=&quot;clr-namespace:TaskHole.App.Controls&quot;
          xmlns:tcc=&quot;clr-namespace:TaskHole.CustomControls&quot;
          Background=&quot;Transparent&quot;&gt;
      &lt;StackPanel VerticalAlignment=&quot;Bottom&quot; HorizontalAlignment=&quot;Stretch&quot; MinWidth=&quot;1&quot; Grid.Row=&quot;2&quot; Height=&quot;Auto&quot; AllowDrop=&quot;True&quot;&gt;
          &lt;ItemsControl Name=&quot;todolist&quot; ItemsSource=&quot;{Binding}&quot;&gt;
              &lt;ItemsControl.ItemsPanel&gt;
                  &lt;ItemsPanelTemplate&gt;
                      &lt;VirtualizingStackPanel Name=&quot;stackPanel&quot; VerticalAlignment=&quot;Bottom&quot;&gt;
                      &lt;/VirtualizingStackPanel&gt;
                  &lt;/ItemsPanelTemplate&gt;
              &lt;/ItemsControl.ItemsPanel&gt;
              &lt;ItemsControl.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;t:TodoStackCard x:Name=&quot;card&quot; TaskHover=&quot;card_TaskHover&quot; Orientation=&quot;Vertical&quot; VerticalContentAlignment=&quot;Top&quot; /&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ItemsControl.ItemTemplate&gt;
          &lt;/ItemsControl&gt;
      &lt;/StackPanel&gt;
  &lt;/UserControl&gt;
  </code></pre>
  <p>I have multiple instances of these windows, and I want to be able to drag any of the controls between the windows. I have tried using a Thumb control and, while this works, it only allows me to drag a control around the containing canvas.</p>
  <p>How do I mimic the behaviour of, say, Windows Explorer, where I can drag a file outside of the application and onto another application, all the while seeing a ghosted representation of the file under the cursor.</p>
  <p>Can I accomplish this purely in C# and WPF? If so/if not, how?</p>