Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

WindowConfiguration.Apply Method

Invokes a previously saved named window configuration.

Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)

void Apply (
	[OptionalAttribute] [InAttribute] bool FromCustomViews
void Apply (
	/** @attribute InAttribute() */ /** @attribute OptionalAttribute() */ boolean FromCustomViews
function Apply (
	FromCustomViews : boolean



If this is true, the named view in the custom window configuration persistence is the search target. If this is false, then the installed, predefined persistence of window configurations is searched. The default is true.

You can save your current window layout in the Visual Studio environment as a named window configuration. Use the Item method of the WindowConfigurations collection to navigate to the desired configuration, and then use the Apply method to recall the configuration.

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: " + 
    MessageBox.Show("Current active window configuration: " + 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.