SelectionContainer الواجهة
يمثل سياق تحديد مع الكائنات طراز تحديد أدناه مشروع العنصر المستوى.
مساحة الاسم: EnvDTE
التجميع: EnvDTE (في EnvDTE.dll)
بناء الجملة
'إقرار
<GuidAttribute("02273422-8DD4-4A9F-8A8B-D70443D510F4")> _
Public Interface SelectionContainer _
Inherits IEnumerable
[GuidAttribute("02273422-8DD4-4A9F-8A8B-D70443D510F4")]
public interface SelectionContainer : IEnumerable
[GuidAttribute(L"02273422-8DD4-4A9F-8A8B-D70443D510F4")]
public interface class SelectionContainer : IEnumerable
[<GuidAttribute("02273422-8DD4-4A9F-8A8B-D70443D510F4")>]
type SelectionContainer =
interface
interface IEnumerable
end
public interface SelectionContainer extends IEnumerable
ملاحظات
SelectionContainerالكائن هو العام تعقب تحديد الكائن. هناك هو كائن التحديد عمومي واحد للبيئة: DTE.SelectedItems.SelectionContainer.
SelectedItemsهو عبارة عن مجموعة الذي يمثل الفرديةProjectItemكائن s، الذي يمكن أن تحصلProjectكائن. لأنه يمكن لعنصر عرض مجموعة محددة كائن إجبارية في سياق الخاص به، ومع ذلك، SelectionContainerيمكن أن تمثل أي نوع من كائن محدد.
أمثلة
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