Share via


WindowConfiguration.Apply 메서드

이전에 저장된 명명된 창 구성을 호출합니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
Sub Apply ( _
    FromCustomViews As Boolean _
)
void Apply(
    bool FromCustomViews
)
void Apply(
    [InAttribute] bool FromCustomViews
)
abstract Apply : 
        FromCustomViews:bool -> unit
function Apply(
    FromCustomViews : boolean
)

매개 변수

  • FromCustomViews
    형식: Boolean

    값이 true이면 사용자 지정 창 구성 지속성의 명명된 뷰가 검색 대상이고 false이면 설치 후 미리 정의된 창 구성 지속성이 검색됩니다. 기본값은 true입니다.

설명

Visual Studio 환경에서 현재 창 레이아웃을 명명된 창 구성으로 저장할 수 있습니다. WindowConfigurations 컬렉션의 Item 메서드를 사용하여 원하는 구성을 탐색한 다음 Apply 메서드를 사용하여 구성을 다시 호출할 수 있습니다.

예제

Sub ApplyExample(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 ApplyExample(_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 보안

참고 항목

참조

WindowConfiguration 인터페이스

EnvDTE 네임스페이스

기타 리소스

WindowConfiguration 작성 예제

WindowConfiguration 선택 예제