次の方法で共有


SelectedItems.SelectionContainer プロパティ

選択した項目 (複数可) をホストするデザイナーを表す SelectionContainer オブジェクトを取得します。

名前空間:  EnvDTE
アセンブリ:  EnvDTE (EnvDTE.dll 内)

構文

'宣言
ReadOnly Property SelectionContainer As SelectionContainer
SelectionContainer SelectionContainer { get; }
property SelectionContainer^ SelectionContainer {
    SelectionContainer^ get ();
}
abstract SelectionContainer : SelectionContainer with get
function get SelectionContainer () : SelectionContainer

プロパティ値

型 : EnvDTE.SelectionContainer
SelectionContainer オブジェクト。

解説

SelectionContainer は、Project または ProjectItem よりも細かい単位でオブジェクトのコレクションを返します。

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 セキュリティ

  • 直前の呼び出し元に対する完全な信頼。このメンバーは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

関連項目

SelectedItems インターフェイス

EnvDTE 名前空間