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
Override the
GetProperty(uint itemId, int propId, out object property)method to filter property pages and obtain aclsidslist.Remove the Build Events page from obtained
clsidslist.
To add a property page in Project Designer
Create a property page you want to add.
Register your new property page.
Override the
GetProperty(uint itemId, int propId, out object property)method to filter property pages, obtain aclsidslist and add a new property page.
All code examples provided in this topic are parts of a larger example, VSSDK Samples. |