How to: Provide Your Own Properties Window

It is possible to provide your own Properties window for a given project system, instead of extending the Properties window provided by the Visual Studio integrated development environment (IDE). The most-often encountered scenario is when you yourself implement the object sited in the window frame.

In the event you do not implement the object sited in the window frame, but do still have access to it by some other means, there are a number of ways to access IVsWindowFrame as listed in the last procedure on this page.

To provide your Properties window

  1. You need to define a GUID that represents your Properties window implementation.

  2. In your SetSite(IServiceProvider) implementation you need to use the IProfferService service to proffer your Properties window as a service to the Visual Studio Environment.

To call your properties window

  1. Call the SetSite method.

  2. QueryService for SVsTrackSelectionEx from the IServiceProvider passed into the SetSite method.

  3. Obtain IVsTrackSelectionEx from SVsTrackSelectionEx service.

  4. Call OnElementValueChange with first parameter set to SEID_PropertyBrowserSID (taken from the VSConstants.VSSELELEMID enumeration), and the third parameter, varValue, representing a string form of the GUID that represents your Properties window. Make this call only once at the first creation of your Properties window document window. After the call this Properties window is associated with your window frame.

To obtain the Window Frame object when you are not the implementer

See Also

Concepts

Properties Window and Property Pages

Properties Window Fields and Interfaces