Project Property User Interface

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

A project subtype can use the items in the project Property Pages dialog box as they are supplied by the base project, hide or make read-only controls and whole pages as supplied, or add project subtype-specific pages to the Property Pages dialog box.

Extending the Project Property Dialog Box

A project subtype implements automation extenders and project configuration browse objects. These extenders implement the IFilterProperties interface to make particular properties hidden or read-only. The Property Pages dialog box of the base project, implemented by the base project, honors the filtering performed by the Automation Extenders.

The process of extending a Project Property dialog box is outlined below:

  • The base project retrieves the extenders from the project subtype by implementing the IInternalExtenderProvider interface. The browse, project automation, and project configuration browse objects of the base project all implement this interface.

  • The implementation of IInternalExtenderProvider for the project browse object and the project automation object delegate to the IInternalExtenderProvider implementation of the project subtype aggregator (that is, they QueryInterface for IInternalExtenderProvider on the IVsHierarchy project object).

  • The base project configuration browse object also implements IInternalExtenderProvider to directly wire in the Automation Extender from the project subtype configuration object. Its implementation delegates to the IInternalExtenderProvider interface implemented by the project subtype aggregator.

  • GetProjectItem, implemented by the project configuration browse object, returns the IVsHierarchy object.

  • GetCfg, also implemented by the project configuration browse object, returns the IVsCfg object.

  • A project subtype can determine the appropriate CATIDs for the various extendable objects of the base project at runtime by retrieving the following __VSHPROPID2 values:

    To determine the CATIDs for the project scope, the project subtype retrieves the above properties for VSConstants.VSITEMID from the VSITEMID``typedef. A project subtype may also want to control which Property Pages dialog box pages are displayed for the project, both configuration dependent and configuration independent. Some project subtypes may need to remove built-in pages and add project subtype specific pages. In order to enable this, the managed client project calls the GetProperty method for the following properties:

  • VSHPROPID_PropertyPagesCLSIDList — a semicolon-delimited list of CLSIDs of configuration-independent property pages.

  • VSHPROPID_CfgPropertyPagesCLSIDList — a semicolon-delimited list of CLSIDs of configuration-dependent property pages.

    Because the project subtype aggregates the IVsHierarchy object, it can override the definition of these properties to control which Property Pages dialog boxes are displayed. The project subtype can retrieve these properties from the inner base project and then add or remove CLSIDs as necessary.

    New property pages added by a project subtype are handed a project configuration browse object from the base project implementation. This project configuration browse object supports Automation Extenders. For more information on AutomationExtenders, see Implementing and Using Automation Extenders. The property pages implemented by the project subtype call Extender[] to retrieve their own project subtype configuration browse object that extends the configuration browse object of the base project.

See Also

IFilterProperties
Property Pages Dialog Box