Condividi tramite


Window.SetSelectionContainer(Object[]) Method

Definition

Allows setting objects to be active in the Properties window when this window is active.

public:
 void SetSelectionContainer(cli::array <System::Object ^> ^ % Objects);
void SetSelectionContainer(std::Array <winrt::Windows::Foundation::IInspectable const &> const & & Objects);
[System.Runtime.InteropServices.DispId(133)]
public void SetSelectionContainer (ref object[] Objects);
[<System.Runtime.InteropServices.DispId(133)>]
abstract member SetSelectionContainer : Object[] -> unit
Public Sub SetSelectionContainer (ByRef Objects As Object())

Parameters

Objects
Object[]

Required. An array of objects for the Properties window.

Attributes

Examples

SetSelectionContainer requires a tool 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.

Applies to