This sample demonstrates how to add custom options pages into the standard Visual Studio Options dialog. The sample adds two options pages and demonstrates how to customize the presentation and properties' persistence. 


The sample solution includes only one project (OptionsPage), which contains classes that provide a Visual Studio Package and custom Options Pages that will be integrated into the Visual Studio IDE. The OptionsPagePackage class uses ProvideOptionsPages attribute to provide custom options pages.

To implement an options page, the class should be a Microsoft.VisualStudio.Shell.DialogPage. Within the sample we have two pages: OptionsPageGeneral and OptionsPageCustom. Both pages allow the user to provide custom properties. OptionsPageGeneral uses a standard Property editor control for presentation. OptionsPageCustom uses a custom control (OptionsCompositeControl) for the UI.

The ProvideProfile attribute is used to provide persistence for the package. The DesignerSerializationVisibility attribute is used to allow persistence for each property of the options page.

To start the sample:

  1. Build the solution
  2. Open Visual Studio under experimental hive
  3. Check new category and new options pages within Visual Studio Options dialog. (Menu [Tools].[Options].[My Managed Options (C#)]).



Additional Resources


Unit Tests: