Inject Custom ToolWindow

4 posts, 1 answers
  1. Beijerinc
    Beijerinc avatar
    19 posts
    Member since:
    Feb 2011

    Posted 29 Nov 2011 Link to this post

    Hello,

    In version 2011.1.419.1040 (Q1 2011 SP1) I was able to inject a custom ToolWindow during the "OpenInToolWindow" methods of the RadDocking control. I was able to override these methods and create my own ToolWindow. To show this window I added it to the

    PopupPanel control (which was a Canvas).

    I have updated the project to version 2011.3.1116.1040 (Q3 2011). In this version the ToolWindows have changed. They now have an Activate and Deactivate event and are basically windows (they inherit WindowBase). Cudo's for that by the way, I had to hack that in myself in the Q1 2011 SP1 version. Anyways, it is not clear to me why the standard ToolWindows are visible, because the PopupPanel is now gone. What is their visual parent, what control are they added to to make them visible and how can I inject my own ToolWindow using the "OpenInToolWindow" method?

    Also, I am missing an Open method in the ToolWindow. How exactly can I open a ToolWindow myself, or a WindowBase for that matter? The "IsOpen" property is only a getter.

    I would be very grateful for your help,
    Beijerinc
  2. Answer
    Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 02 Dec 2011 Link to this post

    Hello Beijerinc,

    The OpenInToolWindow method is not virtual anymore, because we added GeneratedItemsFactory which is responsible for creating ToolWindows, SplitContainers and PaneGroups. You can create your own factory and set it to the RadDocking control. Please refer to the attached project that demonstrates how to use this feature.

    The ToolWindows now inherit from WindowBase like the Radwindow does and don't need to be placed in a special panel anymore. Now they are opened in separate popups. The ToolWindow control is meant to be opened automatically by the Docking control and that is why we made the Open method internal.

    Hope this information is helpful.

    Best wishes,
    Miroslav Nedyalkov
    the Telerik team

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

  3. DevCraft banner
  4. Beijerinc
    Beijerinc avatar
    19 posts
    Member since:
    Feb 2011

    Posted 05 Dec 2011 Link to this post

    Thank you for the explanation. I am not sure how to use the GeneratedItemsFactory, but it sounds like a good solution. I cannot see the attached project though, did you forget to attach it? I would like to see the project for an example on how to use the GeneratedItemsFactory.

    By the way, in the Q3 2011 release the OpenInToolWindow methods are still protected and virtual. Did you mean that they will not be virtual in the next (Q4 2011) release?

    Thanks again and best wishes,
    Beijerinc
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 06 Dec 2011 Link to this post

    Hello Beijerinc,

    Please accept my apologize for this mistake. The project is attached to this post. About the protected virtual methods - we have no plans for them now, but I would suggest you to use the factory, if this is possible for you as if we decide to make major changes on the Docking control we will preserve the public API, but might not preserve all protected methods as it might not be possible.

    Hope this helps.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

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

Back to Top