locked
CreateToolWindow2 popup using WPF RRS feed

  • Question

  • currently, I use a winforms user control as the UI for my CreateToolWindow2 popup.  The popup is used to generate and insert code snippets. From that winforms control popup I call WPF windows to prompt and make the specific code.

    Now that I am at VS2010 can I make changes so there is no winforms involved?  I like the tool window functionality, where the tool window popup and the VS editor are active at the same time. Only, I want to code the tool window entirely in WPF.

    thanks,

     

    Wednesday, May 5, 2010 11:32 AM

Answers

  • Hi Steve,

    It is not required to use winform control to host WPF control in VS 2010. If you create a new package with tool window from scratch in VS 2010, a WPF user control will be generated. In your ToolWindowPane, please set the WPF control's instance to its Content property.

    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.
    • Marked as answer by Steve Richter Thursday, May 6, 2010 12:52 PM
    Thursday, May 6, 2010 3:32 AM

All replies

  • Hi Steve,

    It is not required to use winform control to host WPF control in VS 2010. If you create a new package with tool window from scratch in VS 2010, a WPF user control will be generated. In your ToolWindowPane, please set the WPF control's instance to its Content property.

    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.
    • Marked as answer by Steve Richter Thursday, May 6, 2010 12:52 PM
    Thursday, May 6, 2010 3:32 AM
  • thanks for the help.  I should have tried to get it to work before asking the question.  In the same solution that contains the WinForms user control specified on the call to CreateToolWindow2, I added a new WPF user control library project.  In project properties, make the project com visible, assign a GUID and it works basically like the winform version.

     

    Thursday, May 6, 2010 2:59 PM