title: Drag & Drop to Reorder items within listbox wpf
body: <p>I have a listbox displaying some real estate properties which are objects I have stored in a local database. The listbox is bound to this database using simple data binding. I wanted to implement a drag and drop system to allow the user to rearrange the items accordingly. However, no matter which implementation I try that I have found on the internet, the rearranging simply doesn't work. I have tried atleast 5 different versions and all of them allow me to drag the object, display the ghost adorner, and even show the line where the listboxitem will fall, but after releasing the mouse button the item simply doesn't move. No error, no nothing. Here is my code for my listbox, I was hoping it would be some stupid piece of code preventing this from occuring:</p>
  
  <pre><code>&lt;ListBox Height="424" 
          Margin="24,80,0,0" 
          x:Name="listBoxProperties"
          VerticalAlignment="Top"  ItemTemplate="{StaticResource propertySummaryTemplate}"
          IsSynchronizedWithCurrentItem="True"            
          local:DragDropHelper.IsDragSource="True" local:DragDropHelper.IsDropTarget="True"
  
          Width="216" BorderThickness="0" Background="{x:Null}" FontFamily="Segoe UI" ScrollViewer.HorizontalScrollBarVisibility="Disabled" UseLayoutRounding="True" HorizontalAlignment="Left"  ScrollViewer.VerticalScrollBarVisibility="Disabled" /&gt;
  </code></pre>
  
  <p>EDIT: I think the problem may be something to do with the fact that the entity database is bound to the listbox, meaning that the position of the item needs to be changed within the database instead of simply the position within the listbox itself. I am fairly new to this sort of coding so please excuse my lack of code vocabulary.</p>