Udostępnij za pośrednictwem


SelectedItems.SelectionContainer Property

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

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
ReadOnly Property SelectionContainer As SelectionContainer
'Usage
Dim instance As SelectedItems 
Dim value As SelectionContainer 

value = instance.SelectionContainer
SelectionContainer SelectionContainer { get; }
property SelectionContainer^ SelectionContainer {
    SelectionContainer^ get ();
}
function get SelectionContainer () : SelectionContainer

Property Value

Type: EnvDTE.SelectionContainer
A SelectionContainer object.

Remarks

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

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

.NET Framework Security

See Also

Reference

SelectedItems Interface

SelectedItems Members

EnvDTE Namespace