When I start dragging all items get deselected. Do you have a suggestion how can I do this?
<ListBox x:Name="FileListBox" ... SelectionMode="Extended" PreviewMouseMove="List_MouseMove" >
private void List_MouseMove(object sender, MouseEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed ) { cList files = GetSelectedFiles(); string dataFormat = DataFormats.FileDrop; DataObject dataObject = new DataObject("myFormat", files); DragDrop.DoDragDrop(FileListBox, dataObject, DragDropEffects.Copy); } }