I want to Reorder the RasExpander Control with the help of DragDropManager inside the Stackpanel. Can you please guide me how to do this? Please help me with the sample if possible.
I understand that you need to move RadExpander control which could be a bit tricky, because the DragDropManagerworks best with data objects rather than UIElements. This is why it might be easier if you define the RadExpanders in a ListBox.ItemTemplate 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 control.
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,
TeamX2_Pavel
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.