添加一个工具窗口到域特定语言 (dsl) 生成的设计器。
命名空间: Microsoft.VisualStudio.Modeling.Shell
程序集: Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0(在 Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0.dll 中)
语法
声明
Protected Sub AddToolWindow ( _
toolWindowType As Type _
)
protected void AddToolWindow(
Type toolWindowType
)
参数
- toolWindowType
类型:System.Type
工具窗口的类型添加的。
备注
如果包支持工具窗口,应调用此方法时, ModelingPackage 类初始化时。
单实例仅工具窗口支持。因此,始终映射结果为 1:1。
工具窗口创建实例以在要求。
示例
下面的示例注册在 CustomToolWindow 类中定义的自定义工具窗口。
protected override void Initialize()
{
//Initializes the base class for the package
base.Initialize();
//Registers a custom tool window
this.AddToolWindow(typeof(CustomToolWindow));
}
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。