locked
using WPF window from visual studio addin RRS feed

  • Question

  • I have a visual studio addin that uses the ShowDialog method to prompt a WinForms data entry form.  I have recoded the form as a WPF Window. How do I Run this Window object in a VS addin class library? I don't have an Application object in my addin class ( at least I don't think I do ).

    thanks,

    here is my windows forms code:

    		public void Exec(
          string commandName, vsCommandExecOption executeOption, ref object varIn, 
          ref object varOut, ref bool handled)
    		{
    			handled = false;
          if (executeOption == vsCommandExecOption.vsCommandExecOptionDoDefault)
          {
    
            if (commandName == "AddinManager.Connect.AddinManager")
            {
    
              ManagerPrompt mp = new ManagerPrompt();
              DialogResult rv = mp.ShowDialog();
            }
    
          }
    
    
    

     

      public partial class ManagerPrompt : Form
      {
    ....
    }
    
    Monday, November 16, 2009 11:27 AM

Answers

  • sorry. Dumb question.   I use the ShowDialog method of the Window object.
    • Marked as answer by Steve Richter Monday, November 16, 2009 2:30 PM
    Monday, November 16, 2009 2:30 PM