WindowConfigurations Schnittstelle

Definition

Die WindowConfigurations-Auflistung enthält alle benannten Fensterkonfigurationen, die für die Umgebung erstellt wurden.The WindowConfigurations collection contains all named window configurations created for the environment.

public interface class WindowConfigurations : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("E577442A-98E1-46C5-BD2E-D25807EC81CE")]
[System.Runtime.InteropServices.TypeLibType(4160)]
public interface WindowConfigurations : System.Collections.IEnumerable
[<System.Runtime.InteropServices.Guid("E577442A-98E1-46C5-BD2E-D25807EC81CE")>]
[<System.Runtime.InteropServices.TypeLibType(4160)>]
type WindowConfigurations = interface
    interface IEnumerable
Public Interface WindowConfigurations
Implements IEnumerable
Attribute
Implementiert

Beispiele

Sub WinConfigurationsExample(ByVal dte As DTE)  
    ' This example lists all currently available named window   
    ' configurations.  
    ' Set references to all necessary objects.  
    Dim colWinConfig As WindowConfigurations  
    Dim objWinConfig As WindowConfiguration  

    colWinConfig = dte.WindowConfigurations  

    MsgBox("Number of configurations: " & colWinConfig.Count)  
    ' List all saved named window configurations  
    FillMsg(colWinConfig)  
    ' Create a new window configuration.  
    objWinConfig = colWinConfig.Add("NewLayout")  
    FillMsg(colWinConfig)  
    ' Get rid of the new window configuration.  
    objWinConfig.Delete()  
    MsgBox("Number of configurations: " & colWinConfig.Count)  
    FillMsg(colWinConfig)  
End Sub  

Sub FillMsg(ByVal colWinConfig As Object)  
    ' Lists all currently available named window configurations.  
    Dim lCtr As Integer  
    Dim strMsg As String  

    For lCtr = 1 To colWinConfig.Count  
    strMsg = strMsg & "Configuration name " & lCtr & ": " & _  
    colWinConfig.Item(lCtr).Name & vbCr  
    Next lCtr  
    strMsg = "Current Configurations: " & vbCr & strMsg  
    MsgBox(strMsg)  
End Sub  
void WinConfigExample1(_DTE dte)  
{  
// Set references to all necessary objects.  
    WindowConfigurations colWinConfig;   
    WindowConfiguration objWinConfig;  

    colWinConfig = dte.WindowConfigurations;  

    MessageBox.Show("Number of configurations: " +   
      colWinConfig.Count);  

    // List all saved named window configurations.  
    FillMsg(colWinConfig);  
    // Create a new window configuration.  
    objWinConfig = colWinConfig.Add("NewLayout");  
    FillMsg(colWinConfig);  
    // Get rid of the new window configuration.  
    objWinConfig.Delete();  
    MessageBox.Show("Number of configurations: " + colWinConfig.Count);  
    FillMsg(colWinConfig);  
}  

void FillMsg(WindowConfigurations colWinConfig )  
{  
        // Lists all currently available named window configurations.  
    int lCtr;  
    string strMsg = null;  

    for (lCtr = 1; lCtr < colWinConfig.Count + 1; lCtr ++)  
    {  
        strMsg = strMsg + "Configuration name " + lCtr + ": " +   
            colWinConfig.Item(lCtr).Name + "\n";   
    }  
    strMsg = "Current Configurations: \n" + strMsg;  
    MessageBox.Show(strMsg);  
}  

Hinweise

Sie können das aktuelle Fenster Layout in der Visual Studio-Umgebung als benannte Fenster Konfiguration speichern.You can save your current window layout in the Visual Studio environment as a named window configuration. Die Auflistung WindowConfigurations enthält alle Konfigurationen.The WindowConfigurations collection contains all such configurations.

Eigenschaften

ActiveConfigurationName

Ruft den Namen der aktuell aktiven Fensterkonfiguration ab.Gets the name of the currently active window configuration.

Count

Ruft einen Wert ab, der die Anzahl von Objekten in der Auflistung angibt.Gets a value indicating the number of objects in the collection.

DTE

Ruft das Erweiterbarkeitsobjekt der obersten Ebene ab.Gets the top-level extensibility object.

Parent

Ruft das unmittelbar übergeordnete Objekt einer WindowConfigurations-Auflistung ab.Gets the immediate parent object of a WindowConfigurations collection.

Methoden

Add(String)

Erstellt eine neue benannte Fensterkonfiguration basierend auf der aktuellen Fensteranordnung, fügt diese zur WindowConfigurations-Auflistung hinzu und speichert sie zur späteren Verwendung.Creates a new named window configuration based on the current arrangement of windows, adds it to the WindowConfigurations collection, and retains it for future recall.

GetEnumerator()

Ruft eine Enumeration für Elemente in einer Auflistung ab.Gets an enumeration for items in a collection.

Item(Object)

Gibt einen indizierten Member einer WindowConfigurations-Auflistung zurück.Returns an indexed member of a WindowConfigurations collection.

Gilt für: