Window2.LinkedWindowFrame Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a Window object representing the window frame containing the window.
public:
property EnvDTE::Window ^ LinkedWindowFrame { EnvDTE::Window ^ get(); };
public:
property EnvDTE::Window ^ LinkedWindowFrame { EnvDTE::Window ^ get(); };
[System.Runtime.InteropServices.DispId(117)]
public EnvDTE.Window LinkedWindowFrame { [System.Runtime.InteropServices.DispId(117)] get; }
[<System.Runtime.InteropServices.DispId(117)>]
[<get: System.Runtime.InteropServices.DispId(117)>]
member this.LinkedWindowFrame : EnvDTE.Window
Public ReadOnly Property LinkedWindowFrame As Window
Property Value
A Window object.
Implements
- Attributes
Examples
This example creates a linked window frame, adds the Output Window and Solution Explorer to the linked frame as vertical windows, activates the linked window frame, and then undocks the windows from the frame.
Imports EnvDTE
Imports EnvDTE80
Sub LinkedWindowFrameExample(ByVal dte As DTE2)
Dim Frame As Window2
Dim w1 As Window2 = _
CType(dte.Windows.Item _
(Constants.vsWindowKindSolutionExplorer),Window2)
Dim w2 As Window2 = CType(dte.Windows.Item _
(Constants.vsWindowKindOutput), Window2)
' Create a linked window frame and dock Solution Explorer
' and the Ouput window together inside it.
Frame = Ctype(dte.Windows.CreateLinkedWindowFrame(w1, w2, _
vsLinkedWindowType.vsLinkedWindowTypeVertical), Window2)
MsgBox("Activating the linked window frame...")
Frame.LinkedWindows.Item(1).LinkedWindowFrame.Activate()
MsgBox("Removing Solution Explorer from the linked frame...")
Frame.LinkedWindows.Remove(w1)
MsgBox("Removing the Output window from the linked frame...")
Frame.LinkedWindows.Remove(w2)
End Sub
using EnvDTE;
using EnvDTE80;
using System.Windows.Forms;
public void LinkedWindowFrameExample(DTE2 dte)
{
Window2 w1 = (Window2)_applicationObject.Windows.Item
(Constants.vsWindowKindSolutionExplorer);
Window2 w2 = (Window2)_applicationObject.Windows.Item
(Constants.vsWindowKindOutput);
Window2 Frame =
(Window2)_applicationObject.Windows.CreateLinkedWindowFrame
(w1, w2, vsLinkedWindowType.vsLinkedWindowTypeVertical);
MessageBox.Show("Activating the linked window frame...");
Frame.LinkedWindows.Item(1).LinkedWindowFrame.Activate();
MessageBox.Show("Removing Solution Explorer
from the linked frame...");
Frame.LinkedWindows.Remove(w1);
MessageBox.Show("Removing the Output window from the
linked frame...");
Frame.LinkedWindows.Remove(w2);
}
Remarks
Note that if the window is docked to the side of the main window, then the LinkedWindowFrame is the same object as the main environment window.
If the window is not linked, is of type LinkedWindowFrame, is hidden, or is a document, then LinkedWindowFrame returns Nothing
. Hidden windows are not considered linked because they are not in a window frame.