Posted
on Feb 2, 2012
(permalink)
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.