Package.CreateToolWindow 方法
使用指定的 ID. 创建指定类型的一个工具窗口
命名空间: Microsoft.VisualStudio.Shell
程序集: Microsoft.VisualStudio.Shell.11.0(在 Microsoft.VisualStudio.Shell.11.0.dll 中)
语法
声明
Protected Function CreateToolWindow ( _
toolWindowType As Type, _
id As Integer _
) As WindowPane
protected WindowPane CreateToolWindow(
Type toolWindowType,
int id
)
参数
- toolWindowType
类型:System.Type
工具窗口的类型创建的。
- id
类型:System.Int32
工具窗口 ID.这是 0 个单实例工具窗口的。
返回值
类型:Microsoft.VisualStudio.Shell.WindowPane
请求的工具窗口的实例。
异常
异常 | 条件 |
---|---|
ArgumentNullException | toolWindowType 为 null。 |
ArgumentException |
|
备注
CreateToolWindow 方法创建特定工具窗口的实例。 这在包基类中使用,在实现 Visual Studio 接口工具窗口创建代码时以及 FindToolWindow 方法。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。