Share via


SelectionContainer (Interfaz)

Actualización: noviembre 2007

Representa el contexto de selección con objetos que modelan la selección bajo el nivel del elemento de proyecto.

Espacio de nombres:  EnvDTE
Ensamblado:  EnvDTE (en EnvDTE.dll)

Sintaxis

<GuidAttribute("02273422-8DD4-4A9F-8A8B-D70443D510F4")> _
Public Interface SelectionContainer _
    Implements IEnumerable

Dim instance As SelectionContainer
[GuidAttribute("02273422-8DD4-4A9F-8A8B-D70443D510F4")]
public interface SelectionContainer : IEnumerable
[GuidAttribute(L"02273422-8DD4-4A9F-8A8B-D70443D510F4")]
public interface class SelectionContainer : IEnumerable
public interface SelectionContainer extends IEnumerable

Comentarios

El objeto SelectionContainer es un objeto genérico de seguimiento de la selección. Hay un objeto de selección global para el entorno: DTE.SelectedItems.SelectionContainer.

SelectedItems es una colección que representa objetos ProjectItem individuales entre los que se puede obtener el objeto Project. Sin embargo, dado que un elemento puede ofrecer una selección de un objeto arbitrario dentro de su contexto, el objeto SelectionContainer puede representar cualquier tipo de objeto seleccionado.

Ejemplos

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

Vea también

Referencia

SelectionContainer (Miembros)

EnvDTE (Espacio de nombres)