共用方式為


WindowConfigurations.ActiveConfigurationName 屬性

取得目前使用中的視窗組態名稱。

命名空間:  EnvDTE
組件:  EnvDTE (在 EnvDTE.dll 中)

語法

'宣告
ReadOnly Property ActiveConfigurationName As String
string ActiveConfigurationName { get; }
property String^ ActiveConfigurationName {
    String^ get ();
}
abstract ActiveConfigurationName : string
function get ActiveConfigurationName () : String

屬性值

型別:System.String
字串,表示目前使用中的視窗組態名稱。

範例

Sub ActiveConfigurationNameExample(dte as DTE)
    ' Set references to all necessary objects.
    Dim colWinConfig As WindowConfigurations
    Dim objWinConfig As WindowConfiguration
    colWinConfig = dte.WindowConfigurations
    objWinConfig = colWinConfig.Item(2)

    ' List the current window configuration, then set it to another 
    ' one.
    MsgBox("Current active window configuration: " & _
    colWinConfig.ActiveConfigurationName)
    objWinConfig.Apply()
    MsgBox("Current active window configuration: " & _
    colWinConfig.ActiveConfigurationName)
End Sub
void ActiveConfigurationNameExample(_DTE dte)
{
    // Set references to all necessary objects.
    WindowConfigurations colWinConfig;
    WindowConfiguration objWinConfig;
    colWinConfig = dte.WindowConfigurations;
    objWinConfig = colWinConfig.Item(2);
        
    // List the current window configuration, then set it to another 
    // one.
    MessageBox.Show("Current active window configuration: " +    
    colWinConfig.ActiveConfigurationName);
    objWinConfig.Apply(false);
    MessageBox.Show("Current active window configuration: " + 
    colWinConfig.ActiveConfigurationName);
}

.NET Framework 安全性

請參閱

參考

WindowConfigurations 介面

EnvDTE 命名空間