Hello!
I have a view with a RadListBox consisting of RadRichTextBoxes on the left, and RadTreeView on the right.
Previously I just needed DragDrop behavior to enable user reorder items inside ListBox view, but now I am implementing scenario when user can drag an item from TreeView into one of the RadRichTextBoxes (this will insert some text at the caret position, but that does not matter).
I made this scenario work, but discovered that attempt to reorder items in ListBox now does not work correctly - if a dragged list item is dropped on a visual line before or after some other text item - it just disappears from the view. During investigation I discovered that all is ok unless I subscribe to any RadRichTextBox DropPreview event (to process tree item drop into RichTextBox). After this subscription is made DrapDrop behavior method Drop is never called, thus dragged list item is removed from ListBox ItemsSource collection and never added back to it with new index.
Thus my question is - how can I fix this problem and get both DragDrop scenarios work correctly?
I have a view with a RadListBox consisting of RadRichTextBoxes on the left, and RadTreeView on the right.
Previously I just needed DragDrop behavior to enable user reorder items inside ListBox view, but now I am implementing scenario when user can drag an item from TreeView into one of the RadRichTextBoxes (this will insert some text at the caret position, but that does not matter).
I made this scenario work, but discovered that attempt to reorder items in ListBox now does not work correctly - if a dragged list item is dropped on a visual line before or after some other text item - it just disappears from the view. During investigation I discovered that all is ok unless I subscribe to any RadRichTextBox DropPreview event (to process tree item drop into RichTextBox). After this subscription is made DrapDrop behavior method Drop is never called, thus dragged list item is removed from ListBox ItemsSource collection and never added back to it with new index.
Thus my question is - how can I fix this problem and get both DragDrop scenarios work correctly?