OutputWindowPanes.Add 方法
创建新的**“输出”**窗口窗格并将它添加到集合中。
命名空间: EnvDTE
程序集: EnvDTE(在 EnvDTE.dll 中)
语法
声明
Function Add ( _
Name As String _
) As OutputWindowPane
OutputWindowPane Add(
string Name
)
OutputWindowPane^ Add(
[InAttribute] String^ Name
)
abstract Add :
Name:string -> OutputWindowPane
function Add(
Name : String
) : OutputWindowPane
参数
- Name
类型:System.String
必选。新窗格的标题。
返回值
类型:EnvDTE.OutputWindowPane
OutputWindowPane 对象。
示例
Sub AddExample()
' Create a tool window handle for the Output window.
Dim win As Window = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput)
' Create handles to the Output window and its panes.
Dim OW As OutputWindow = win.Object
Dim OWp As OutputWindowPane
' Add a new pane to the Output window.
OWp = OW.OutputWindowPanes.Add("A New Pane")
' Add a line of text to the new pane.
OWp.OutputString("Some Text")
End Sub
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。