Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > PanelBar > Docking RadPanelBarItems within a RadPanelBar

Answered Docking RadPanelBarItems within a RadPanelBar

Feed from this thread
  • Joe Biggert avatar

    Posted on Jan 30, 2012 (permalink)

    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?

    Reply

  • Tina Stancheva Tina Stancheva admin's avatar

    Posted on Feb 2, 2012 (permalink)

    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 >>

    Attached files

    Reply

  • Joe Biggert avatar

    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.

    Reply

  • Answer Tina Stancheva Tina Stancheva admin's avatar

    Posted on Feb 7, 2012 (permalink)

    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 >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > PanelBar > Docking RadPanelBarItems within a RadPanelBar
Related resources for "Docking RadPanelBarItems within a RadPanelBar"

WPF PanelBar Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]