This is a migrated thread and some comments may be shown as answers.

Reordering ToolBars in the ToolBarTray

3 Answers 149 Views
ToolBar
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 15 Aug 2012, 05:54 PM
I have a WPF application with a ToolBarTray with several toolbars. I want to allow users to drag them around to re-order them to their liking.

I have gotten as far as capturing the OnDragDropCompleted event (using RadDragDropManager) but cannot figure out how to reorder the toolbars.

I presume I need to remove the toolbars from the toolbartray items collection then add them back in the new order, but need some help.

I am very surprised that this isn't a starndard feature of the ToolbarTray component, as is seems like base functionality to me.

Regards,

Kevin

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 20 Aug 2012, 02:26 PM
Hi Kevin,

Unfortunately the RadToolBars cannot be reordered through drag-and-drop out-of-the-box. However, we've logged this task in our to-do list and you can track its progress here.

In the meantime you can use the DragDropManager to implement custom drag reordering behavior. I am not sure what reordering logic you'd like to see in your solution but I attached a sample solution to get you started. It basically allows you to drag a toolbar and drop it next to the item, the drop happens over. Let me know if that helps.

Kind regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Kevin
Top achievements
Rank 1
answered on 20 Aug 2012, 02:47 PM
Tbanks for the sample.

I had already figured out how to drag and drop with a single band, or from one band to another, but the real functionality I'm looking for is to be able to create a new band by dragging off the current band (essentially off the toolbar).

This is a common requirement when shrinking a window down such that the toolbars no longer fit in the window. RadToolBar's overflow area is OK, but doesn't provide the user experience my customers are accustomed to.

Thanks
0
Tina Stancheva
Telerik team
answered on 23 Aug 2012, 04:15 PM
Hello Kevin,

I extended the solution to drag the ToolBars in and outside the ToolBarTray. The logic is specifically designed for the sample solution and you might need to modify it to better fit your requirements but it can be a good starting point.

Let me know if I can further assist you.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ToolBar
Asked by
Kevin
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Kevin
Top achievements
Rank 1
Share this question
or