OutputWindowPanes.Parent 속성
OutputWindowPanes 컬렉션의 바로 위 부모 개체를 가져옵니다.
네임스페이스: EnvDTE
어셈블리: EnvDTE(EnvDTE.dll)
구문
‘선언
ReadOnly Property Parent As OutputWindow
OutputWindow Parent { get; }
property OutputWindow^ Parent {
OutputWindow^ get ();
}
abstract Parent : OutputWindow
function get Parent () : OutputWindow
속성 값
형식: EnvDTE.OutputWindow
OutputWindow 개체
예제
Sub ParentExample(ByVal dte As DTE2)
' Retrieve and show the Output window.
Dim outWin As OutputWindow = dte.ToolWindows.OutputWindow
outWin.Parent.AutoHides = False
outWin.Parent.Activate()
' Find the "Pane1" Output window pane; if it does not exist,
' create it.
Dim pane1 As OutputWindowPane
Try
pane1 = outWin.OutputWindowPanes.Item("Pane1")
Catch
pane1 = outWin.OutputWindowPanes.Add("Pane1")
End Try
' Find the "Pane2" Output window pane; if it doesn't exist,
' create it.
Dim pane2 As OutputWindowPane
Try
pane2 = outWin.OutputWindowPanes.Item("Pane2")
Catch
pane2 = outWin.OutputWindowPanes.Add("Pane2")
End Try
MsgBox("The active Output window pane is " & _
outWin.ActivePane.Name)
If MsgBox("Activate Pane1?", MsgBoxStyle.YesNo) = _
MsgBoxResult.Yes Then
pane1.Activate()
End If
MsgBox("The active Output window pane is " & _
outWin.ActivePane.Name)
End Sub
public void ParentExample(DTE2 dte)
{
// Retrieve and show the Output window.
OutputWindow outWin = dte.ToolWindows.OutputWindow;
outWin.Parent.AutoHides = false;
outWin.Parent.Activate();
// Find the "Pane1" Output window pane; if it doesn't exist,
// create it.
OutputWindowPane pane1 = null;
try
{
pane1 = outWin.OutputWindowPanes.Item("Pane1");
}
catch
{
pane1 = outWin.OutputWindowPanes.Add("Pane1");
}
// Find the "Pane2" Output window pane; if it doesn't exist,
// create it.
OutputWindowPane pane2;
try
{
pane2 = outWin.OutputWindowPanes.Item("Pane2");
}
catch
{
pane2 = outWin.OutputWindowPanes.Add("Pane2");
}
MessageBox.Show("The active Output window pane is " +
outWin.ActivePane.Name);
if (MessageBox.Show("Activate Pane1?", "", MessageBoxButtons.YesNo)
== DialogResult.Yes)
pane1.Activate();
MessageBox.Show("The active Output window pane is " +
outWin.ActivePane.Name);
}
.NET Framework 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.