Window2.SetSelectionContainer Method
Allows setting objects to be active in the Properties Window when this window is active.
Namespace: EnvDTE80
Assembly: EnvDTE80 (in EnvDTE80.dll)
Syntax
'Declaration
Sub SetSelectionContainer ( _
ByRef Objects As Object() _
)
void SetSelectionContainer(
ref Object[] Objects
)
void SetSelectionContainer(
array<Object^>^% Objects
)
abstract SetSelectionContainer :
Objects:Object[] byref -> unit
function SetSelectionContainer(
Objects : Object[]
)
Parameters
Objects
Type: array<Object[]%Required. An array of objects for the Properties window.
Remarks
Sets the objects that should be passed to the Properties window whenever the window has focus. SetSelectionContainer works only on windows created with the CreateToolWindow method. Other tool windows, such as Solution Explorer and Task List, already have code for setting what is displayed in the Properties window.
SetSelectionContainer allows you to associate objects with the window so that whenever the window has focus, the Properties window displays properties for those objects. For example, you would use this property if you have a custom tool window that displays a chart and you want to display properties in the Properties window in order to change characteristics of the chart.
If SetSelectionContainer is passed an empty Variant value, it removes the displayed object. The object displays when the tool window is active and the objects are available from the selection container.
Examples
This property requires a tool window. For an example of how to use this method, see the ToolWindow sample on the Visual Studio Automation Samples webpage: https://www.microsoft.com/downloads/details.aspx?familyid=3ff9c915-30e5-430e-95b3-621dccd25150&displaylang=en.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.