ModelingPackage.GetToolWindow 方法 (Type, Boolean)

获取工具窗口。

命名空间:  Microsoft.VisualStudio.Modeling.Shell
程序集:  Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0(在 Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0.dll 中)

语法

声明
Public Function GetToolWindow ( _
    toolWindowType As Type, _
    forceCreate As Boolean _
) As ToolWindow
public ToolWindow GetToolWindow(
    Type toolWindowType,
    bool forceCreate
)

参数

  • toolWindowType
    类型:System.Type
    工具窗口的类型检索的。
  • forceCreate
    类型:System.Boolean
    返回 true 属于域特定语言设计器包仅的工具窗口;否则,错误。

返回值

类型:Microsoft.VisualStudio.Modeling.Shell.ToolWindow
工具窗口或空,则工具窗口没有返回。

备注

单实例仅工具窗口支持。因此,始终映射结果为 1:1。

当 forceCreate 参数是 true时, IVsToolWindowFactory 创建工具窗口。有关更多信息,请参见 IVsToolWindowFactory

.NET Framework 安全性

请参见

参考

ModelingPackage 类

GetToolWindow 重载

Microsoft.VisualStudio.Modeling.Shell 命名空间