title: Change cursor when dragging in WPF
body: <p>I'm using this great drag/drop framework: <a href="http://code.google.com/p/gong-wpf-dragdrop/" rel="nofollow noreferrer">http://code.google.com/p/gong-wpf-dragdrop/</a>
  I have two listboxes - A and B. When I drag from B to A, I want the mouse cursor to change as soon as the cursor is within the area of listbox A.</p>
  
  <p>I've almost got it. By using the IDropTarget interface as follows:</p>
  
  <pre><code>void IDropTarget.DragOver(DragOver drag)
  {
   drag.Effects = DragDropEffects.Copy | DragDropEffects.Move;
  
   // some logic to determine if hovering over listbox A
   // ...
  
   if (hoveringOverListA)
   {
    ListBoxA.Cursor =  ((FrameworkElement) Application.Current.Resources["ListboxACursor"]).Cursor;
   }
  }
  </code></pre>
  
  <p>The only problem is, while I'm dragging over the cursor that shows is the the operation not allowed one (the black circle with the line through it). As soon as I release the mouse, then I see my ListboxACursor appear. So it's like it's a delayed reaction, like it's waiting for me to Drop instead of doing it while I'm DragOver'ing.</p>
  
  <p>If anyone can see what is wrong with the code, I would greatly appreciate it. I have a feeling it might be to do with the DragDropEffects but it's mainly a hunch.</p>