[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.] 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
-
You need to define a GUID that represents your Properties window implementation.
-
In your SetSite 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
-
Call the SetSite method.
-
QueryService for SVsTrackSelectionEx from the IServiceProvider passed into the SetSite method.
-
Obtain IVsTrackSelectionEx from SVsTrackSelectionEx service.
-
Call OnElementValueChange with first parameter set to SEID_PropertyBrowserSID (taken from the 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
-
You can QueryService for SVsTrackSelectionEx service from GetProperty with the parameter propid set to VSFPROPID_SPFrame.
-
You can obtain the active document window by calling GetCurrentSelection through SVsMonitorSelection service. Set the parameter elementid to SEID_WindowFrame, taken from the VSSELELEMID enumeration.
See Also