Visual Studio 2013
Gets a SelectionContainer object that represents the designer hosting the selected item(s).
Assembly: EnvDTE (in EnvDTE.dll)
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
- 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.