locked
ProvideOptionsPageAttribute with multiple levels. RRS feed

  • Question

  • Is there a way to get the ProvideOptionPageAttribute to register a page under multiple levels of categories -- something like this:

    Tools -> Options -> My Product -> My Feature -> Advanced

    I know I can modify the registry directly (or the pkgdef), but it would be nice if it could be done directly with the attribute.

    Thanks in advance.


    Kirk Fertitta

    Tuesday, April 8, 2014 12:31 AM

Answers

  • Hello Kirk,

    Just to understand your question better, by multiple levels do you mean like one in this screenshot?

    If yes, I was able to do this by using following lines in my package class.

    [ProvideOptionPageAttribute(typeof(CustomOptions), "OptionsWindowDemo", "CustomOptions", 110, 401, true)]
    [ProvideOptionPageAttribute(typeof(AdvancedOptions), "OptionsWindowDemo", "AdvancedOptions", 110, 501, true)]
    [ProvideOptionPageAttribute(typeof(SuperAdvancedOptions), "OptionsWindowDemo\\AdvancedOptions", "SuperAdvanced", 501, 601, true)]
    Please mark this as answer if this post helped you to resolve the issue.



    Regards,
    Utkarsh
    Blog | Twitter


    Thursday, April 24, 2014 9:59 PM

All replies

  • Hi,

    Maybe you are looking for ProvideOptionPageAttribute.Register Method.

    Best regards,

    Sunny

    Wednesday, April 9, 2014 8:11 AM
  • Hi Sunny,

    Thanks for your reply, but those methods are not directly invoked.  They are used to generate the pkgdef.  Do you know how to apply that attribute to the package in such a way that a multi-level hierarchy of Tools -> Options pages can be displayed? That's what I'm trying to sort out.

    Thanks in advance.


    Kirk Fertitta

    Wednesday, April 9, 2014 1:52 PM
  • Hi Kirk,

    Perhaps this is what you looking for?

    http://geekswithblogs.net/onlyutkarsh/archive/2013/06/30/integration-of-options-window-in-visual-studio-extension-with-custom.aspx


    Regards, Utkarsh http://www.geekswithblogs.net/onlyutkarsh

    Saturday, April 19, 2014 8:25 PM
  • That shows the typical, basic usage. I'm looking to register a page under multiple levels, as indicated in the original post.  Have you had any luck tracking down one of the team experts in this area?

    Thanks in advance.


    Kirk Fertitta

    Monday, April 21, 2014 4:07 PM
  • Hello Kirk,

    Just to understand your question better, by multiple levels do you mean like one in this screenshot?

    If yes, I was able to do this by using following lines in my package class.

    [ProvideOptionPageAttribute(typeof(CustomOptions), "OptionsWindowDemo", "CustomOptions", 110, 401, true)]
    [ProvideOptionPageAttribute(typeof(AdvancedOptions), "OptionsWindowDemo", "AdvancedOptions", 110, 501, true)]
    [ProvideOptionPageAttribute(typeof(SuperAdvancedOptions), "OptionsWindowDemo\\AdvancedOptions", "SuperAdvanced", 501, 601, true)]
    Please mark this as answer if this post helped you to resolve the issue.



    Regards,
    Utkarsh
    Blog | Twitter


    Thursday, April 24, 2014 9:59 PM
  • Hello Utkarsh,

    Yes, that is precisely what I meant.  Turned out to be quite simple.  Just tested it and it seems to work fine.  Thanks very much for taking the time to reply.


    Kirk Fertitta

    Friday, April 25, 2014 10:10 PM