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

Docking RadPanelBarItems within a RadPanelBar

3 Answers 92 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Joe Biggert
Top achievements
Rank 1
Joe Biggert asked on 30 Jan 2012, 10:33 PM
Simple question... is it possible to have a RadPanelBar's contents be dockable? For example, I want to be able to drag my RadPanelBarItem out of the RadPanelBar and then back in again. While I know I can dock items inside a RadPanelBarItem, I would love to be able to dock RadPanelBarItems themselves inside the RadPanelBar.

I thought I could do something like setting the ItemsPanelTemplate but I've exhausted all options there.

If the answer is no, are there any suggested methods to having the functionality of a RadPanel (specifically multiple expandedmode) but allow the beautiful docking functionality that the other Telerik controls give you?

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 02 Feb 2012, 05:24 PM
Hi Joe,

The RadPanelBar control cannot be docked but you can take advantage of the Telerik DragDropManager to implement custom logic for dragging and dropping RadPanelBarItems.

I attached a sample project demonstrating how to implement drag/drop operations between two RadPanelBars. I hope it will get you started.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Joe Biggert
Top achievements
Rank 1
answered on 02 Feb 2012, 06:10 PM
This is a great example of drag and drop when it comes to items and the RadPanelBar and I appreciate it but it's not what I'm looking for. I'm more looking for having the docking behavior of RadToolWindows with RadPanelBarItems. After I posted this, I dug deep into the code and realized this was a pipe dream (which you answered as well stating that the RadPanelBar can't take advantage of docking).

My approach to this was first to change the RadPanelBar to allow for this by changing the templates but, as you said, it explicitly doesn't allow for it so I found great difficultly in doing it. I then switched to making my RadPanes look like RadExpanders by altering the TitleTemplate style and through a little magic in the codebehind making the RadExpander clicks show/hide the RadPanes, I achieved a close enough effect to what I want to do. It's not as pretty as I was hoping for but it so far seems like a working solution.

My only hangups are not being able to implement a full XAML solution (I have to capture the RadExpander expand/collapse events in code behind and directly access the RadPanes by name because FindAncestor in XAML from the RadExpander in the TitleTemplate can't find the RadPane object(s)) and, more importantly, how to handle RadPanes that get undocked, turning into ToolWindows, and then docked again, turning back into my customized RadPanes.

Thanks again for the assistance though... I realized after a some trial and error that what I'm trying to do with the RadPanelBar is outside of its capabilities.
0
Accepted
Tina Stancheva
Telerik team
answered on 07 Feb 2012, 02:55 PM
Hi Joe,

Yes unfortunately the RadPanelBar won't work in your scenario. But I am glad that you found another approach. Unfortunately I am not sure how exactly you implement your solution using RadExpander and RadPanes this is why I am not sure how you can get over the issues you described.

Can you start a new thread and give us more information about your approach and the issues you need to get over? If you can send us a sample solution demonstrating your implementation, that would help us better assist you.

All the best,
Tina Stancheva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
PanelBar
Asked by
Joe Biggert
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Joe Biggert
Top achievements
Rank 1
Share this question
or