Adding and Removing Property Pages

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Adding and Removing Property Pages.

The Project Designer provides a centralized location for managing project properties, settings, and resources in Visual Studio. It appears as a single window in the Visual Studio integrated development environment (IDE) and contains a number of panes on the right that are accessed through the tabs on the left. The panes (often referred to as property pages) in the Project Designer vary by project type and language. The Project Designer can be accessed with the Properties command on the Project menu.

A project subtype frequently needs to display additional property pages in the Project Designer. Likewise, some project subtypes might require that built-in property pages be removed. To do either, your project subtype must implement the IVsHierarchy interface and override the GetProperty method. By overriding this method and using propId parameter containing one of the values of the __VSHPROPID2 enumeration, you can filter, add or remove project properties. For example, you might need to add a page to the configuration-dependent property pages. To do this, you need to filter configuration-dependent property pages and then add a new page to the existing list.

To remove a property page in Project Designer

  1. Override the GetProperty(uint itemId, int propId, out object property) method to filter property pages and obtain a clsids list.

    No code example is currently available or this language may not be supported.
  2. Remove the Build Events page from obtained clsids list.

    No code example is currently available or this language may not be supported.

To add a property page in Project Designer

  1. Create a property page you want to add.

    No code example is currently available or this language may not be supported.
  2. Register your new property page.

    No code example is currently available or this language may not be supported.
  3. Override the GetProperty(uint itemId, int propId, out object property) method to filter property pages, obtain a clsids list and add a new property page.

    No code example is currently available or this language may not be supported.
System_CAPS_ICON_note.jpg Note

All code examples provided in this topic are parts of a larger example, VSSDK Samples.

Project Subtypes

Show: