共用方式為


ModelExplorerTreeContainer.SelectedElement 屬性

取得 [模型總管] 中選取的項目。

命名空間:  Microsoft.VisualStudio.Modeling.Shell
組件:  Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0 (在 Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll 中)

語法

'宣告
Protected ReadOnly Property SelectedElement As ModelElement
protected ModelElement SelectedElement { get; }

屬性值

類型:Microsoft.VisualStudio.Modeling.ModelElement
模型總管中選取的項目; 如果未選取任何項目,則為nullnull 參考 (即 Visual Basic 中的 Nothing)。

備註

這個方法受到保護,因此,只取得的子類別可以存取它。

.NET Framework 安全性

請參閱

參考

ModelExplorerTreeContainer 類別

Microsoft.VisualStudio.Modeling.Shell 命名空間