Export (0) Print
Expand All
ID
Top
Expand Minimize

SelectionContainer Property

Visual Studio .NET 2003

Returns a SelectionContainer object that represents the designer hosting the selected item(s).

[Visual Basic .NET]
Public ReadOnly Property SelectionContainer() As SelectionContainer
[Visual Basic 6]
Property Get SelectionContainer() As SelectionContainer
[C++]
HRESULT __stdcall get_SelectionContainer(
   /* [out, retval] */ SelectionContainer** retVal
);
[C#]
public SelectionContainer SelectionContainer {get;}
[JScript .NET]
public function get SelectionContainer() : SelectionContainer

Return Value

Returns a SelectionContainer object.

Remarks

SelectionContainer returns a collection of objects at a finer granularity than Project or ProjectItem.

Example

Sub SelectionContainerExample()
   Dim SelContain As SelectionContainer
   Dim ContainerItem As SelectedItem

   ' Set references to the selection container and its selected item.
   SelContain = DTE.SelectedItems.SelectionContainer
   ContainerItem = DTE.SelectedItems.Item(1)

   ' Print the name of the container of the selected item.
   MsgBox(ContainerItem.Name)
End Sub

See Also

Applies To: SelectedItems Collection

Show:
© 2014 Microsoft