Window2.LinkedWindowFrame Propriedade

Definição

Obtém um Window objeto que representa o quadro da janela que contém a janela.

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

Valor da propriedade

Window

Um objeto Window.

Implementações

Atributos

Exemplos

Este exemplo cria um quadro de janela vinculada, adiciona o janela de saída e Gerenciador de soluções ao quadro vinculado como janelas verticais, ativa o quadro de janela vinculada e, em seguida, desencaixa as janelas do quadro.

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);  
}  

Comentários

Observe que, se a janela estiver encaixada no lado da janela principal, o LinkedWindowFrame será o mesmo objeto que a janela ambiente principal.

Se a janela não estiver vinculada, for do tipo LinkedWindowFrame , será ocultada ou será um documento e, em seguida, LinkedWindowFrame retornará Nothing . Janelas ocultas não são consideradas vinculadas porque não estão em um quadro de janela.

Aplica-se a