I understand that you need to move RadExpander
control which could be a bit tricky, because the DragDropManager
works best with data
objects rather than UIElements
. This is why it might be easier if you define the RadExpanders
in a ListBox
and build their content based on data items.Then you'll be able to use the approach described in the DragDropManager GettingStarted
article or the ListBoxDragDropBehavior
to reorder the items in the ListBox
However, there is a way to achieve this:
First you have to set to True the telerik:DragDropManager.AllowCapturedDrag and AllowDrop properties of all RadExpander controls that you need to move.
Then you have to attach a Drag Initialize Handler and a Drop Handler by using AddDragInitializeHandler and AddDropHandler methods of the DragDropManager. In your case this must be done manually for each expander.
Please find the attached project bellow. And let me know if it satisfies your needs.
All the best,
the Telerik team