accessing custom tools options settings

I've created a custom tools option page using the VS2005 .Addin method described here: http://msdn2.microsoft.com/library/b389wd38(en-us,vs.80).aspx

Now, I need to access the properties on my custom page in my addin.  From the documentation in the "Controlling Tools Options Setting" section it seems like it is not valid to use the DTE.Properties(...) API to access my custom pages.  How do I get access to those pages from my addin



Answer this question

accessing custom tools options settings

  • ja123ee

    Have you checked out 'How to Access Properties of Specific Project Types' from my blog

    I know, it's a shameless plug.  Big Smile

  • joeller

    I took a look at your blog.  It didn't quite answer my question.  I'm interested in getting the values in a custom page that I am creating in "Tools"->"Options"->"My Custom Page".  There is an API that lets you get the non-custom properties:

    EnvDTE.Properties props = application.get_Properties("Environment", "General");

    I want to be able to do this:

    EnvDTE.Properties props = application.get_Properties("My Custom Page", "My Custom SubItem");

    Another option I can think of is to write my properties out to a property file, but I don't see how to listen for the 'OK' or 'Cancel' button events provided by the IDEs Tools Option page when I only provide a UserControl in the .Addin.



  • Larry Menard

    Found the answer... need to implement IDTToolsOptionsPage as well.  It would be helpful to update the doc link above to make a mention of this. 
  • accessing custom tools options settings