I have a list view and have defined handlers for it which will allow me to select an entry on the list and move it to another position.
So I can grab say the 5th item in the list and drag it up to the 2nd position.
In my view model I have code which tells me the 5th item was selected and shows me the contents of the selected data object, but I don't know how to pick up the position I want to move it to.
It is easy if I just want to add to the bottom of the list (say dragging thing sover from 1 list to the other) but I want to resequence the items in my list.
Here is my XAML :
<ListView Grid.Row="1" x:Name="HierarchyMenuListView" Style="{StaticResource ListViewStyle}" Margin="5,5,5,5"
ItemsSource="{Binding Path=UserMenuList}" MouseMove="ListView_MouseMove" Drop="ListView_Drop" AllowDrop="True"
In my ListView_Drop method I can see exactly what I want to move, I just can't pick up where I want to move it to.
Can anyone help? It feels like I am very close, but just not close enough