SelectedItems.SelectionContainer SelectedItems.SelectionContainer SelectedItems.SelectionContainer SelectedItems.SelectionContainer Property

Definition

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

public:
 property EnvDTE::SelectionContainer ^ SelectionContainer { EnvDTE::SelectionContainer ^ get(); };
[System.Runtime.InteropServices.DispId(5)]
[get: System.Runtime.InteropServices.DispId(5)]
public EnvDTE.SelectionContainer SelectionContainer { get; }
member this.SelectionContainer : EnvDTE.SelectionContainer
Public ReadOnly Property SelectionContainer As SelectionContainer
Property Value

Examples

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  

Remarks

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

Applies to