locked
How to change the content in the same toolwindow dynamically RRS feed

  • Question

  • Hi All:

    Can anybody help me figure out how to dynamically change the toolwindow content?

    I have created a single instance toolwindow

    "public class MyToolWindow : ToolWindowPane, IVsWindowFrameNotify3". I have set the a user control to the "Content" in the construction. It works properly.

    But now the requirement is:

    When user clicks the button A, the content in this toolwindow will be shown the button A related information.  Don't close this toolwindow.

    When user clicks the button B, the content in this toolwindow will be shown the button B related information.

    Maybe it is an easy question, but I have tried several solution. It doesn't work.

    Could anybody help me figure out how to change the content in the toolwindow.

    Thanks in advance.

    Thursday, January 23, 2014 1:26 AM

Answers

  • Hi Paddy_82,

    Welcome to the MSDN forum!

    Could you please provide us with the code about your button?

    I know you have two buttons and I think you can do the button click event.

    From MSDN, we see there exists a property named content in ToolWindow Class. WindowPane.Content Property can get or set the content of this tool window.

    Best regards,

    Sunny

    • Marked as answer by Paddy_82 Friday, January 24, 2014 10:19 PM
    Thursday, January 23, 2014 10:35 AM