locked
Multiple usercontrols for one ToolWindow RRS feed

  • Question

  • Hello,

    I am trying to host multiple user controls on a single toolwindow.

    The user controls all inherit from a common control that has a toolbar. A click of a button on the toolbar, for example, should hide the current control and activate a different one.

    Any idea on how I should be approaching this? I haven't found any documentation thus far...

    Thanks!
    Wednesday, February 10, 2010 10:29 PM

Answers

  • Hello,

    Thanks for using MSDN Forum.

    ToolWindowPanel only supports to host one root control. Can you build a parent user control and put multiple user controls into the big user control? Then pass the parent user control to the ToolWindow by it Window property.

    If you are using VS 2008 SDK, you can create a VS Intergation Package.
    Select to create a ToolWindow.
    After project created, double click on the MyControl.cs and it brings windows form designer.
    In the designer's toolbox, add your multiple user controls.
    Drag and drop user controls from toolbox to MyControl

    Hope it helps.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    See what's happening in MSDN forum? Follow us at Twitter.
    • Marked as answer by CSharpNooblet Thursday, February 11, 2010 11:58 PM
    Thursday, February 11, 2010 6:05 AM

All replies

  • Hello,

    Thanks for using MSDN Forum.

    ToolWindowPanel only supports to host one root control. Can you build a parent user control and put multiple user controls into the big user control? Then pass the parent user control to the ToolWindow by it Window property.

    If you are using VS 2008 SDK, you can create a VS Intergation Package.
    Select to create a ToolWindow.
    After project created, double click on the MyControl.cs and it brings windows form designer.
    In the designer's toolbox, add your multiple user controls.
    Drag and drop user controls from toolbox to MyControl

    Hope it helps.

    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    See what's happening in MSDN forum? Follow us at Twitter.
    • Marked as answer by CSharpNooblet Thursday, February 11, 2010 11:58 PM
    Thursday, February 11, 2010 6:05 AM
  • Ok I will give that a go. Thanks!
    Is the process the same for 2005 SDK?
    Thursday, February 11, 2010 10:33 AM
  • 2005 SDK should be the same. Thanks.


    Hongye Sun [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    See what's happening in MSDN forum? Follow us at Twitter.
    Monday, February 15, 2010 7:19 AM