IApplicationDesignModeSettings interface

Enables development tool applications to dynamically spoof system and user states, such as native display resolution, device scale factor, and application view state, for the purpose of testing Windows Store apps running in design mode for a wide range of form factors without the need for the actual hardware. Also enables testing of changes in normally user-controlled state to test Windows Store apps under a variety of scenarios.


The IApplicationDesignModeSettings interface inherits from the IUnknown interface. IApplicationDesignModeSettings also has these types of members:


The IApplicationDesignModeSettings interface has these methods.


Gets the size of the Windows Store app, based on the current set of spoofed settings.


Determines whether a particular application view state is supported for specific spoofed display size and scale factor settings.


Sets a spoofed application view state (full-screen landscape, full-screen portrait, filled, or snapped) to be used for a Windows Store app running in design mode.


Sets a spoofed native display size to be used for a Windows Store app running in design mode.


Sets a spoofed device scale factor to be used for a Windows Store app running in design mode.


Sends a spoofed edge gesture event to the proxy core window on the caller's thread. This gesture toggles the app's app bar, if the app supports one. The caller can specify the type of input that triggered the edge gesture.



This interface is acquired by cocreating CLSID_ApplicationDesignModeSettings.

Users will normally follow a usage pattern similar to the following:

  1. Call CoCreateInstance with CLSID_ApplicationDesignModeSettings to create the application design mode settings object on a thread in the Windows Store app process.
  2. Call QueryInterface on the application design mode settings object to obtain an IInitializeWithWindow object.
  3. Call the Initialize method of the IInitializeWithWindow object, passing in the HWND for the proxy core window. This must be done before any "set" methods are called and will only succeed once per process.
  4. Call QueryInterface for IApplicationDesignModeSettings and spoof the necessary test state by calling its appropriate methods (SetNativeDisplaySize, SetScaleFactor, etc.). These methods will trigger the appropriate Windows Runtime events to fire for the Windows Store app.
  5. Call the ComputeApplicationSize method to determine the proper size for the app, based on the currently spoofed state. All layout "set" methods must have already been called or this call will fail. The developer tool application is responsible for positioning and sizing the app windows, when appropriate.

When to implement

Do not implement this interface; the implementation is supplied with Windows.

When to use

Use the methods of this interface to test your Windows Store app under various spoofed configurations and scenarios.


This example shows the methods of this interface in use.

IApplicationDesignModeSettings *pDesignModeSettings;

// CoCreate the design mode settings object
HRESULT hr = CoCreateInstance(CLSID_ApplicationDesignModeSettings, nullptr, CLSCTX_INPROC, IID_PPV_ARGS(&pDesignModeSettings));
if (SUCCEEDED(hr))
    IInitializeWithWindow *pInitializeWithWindow;
    hr = pDesignModeSettings->QueryInterface(IID_PPV_ARGS(&pInitializeWithWindow);
    if (SUCCEEDED(hr))
        // Before we spoof any state, we must first initialize the design
        // mode settings object with a proxy core window. Since apps
        // running in design mode don't have an actual core window, we must
        // supply an HWND that can be used as a proxy.
        hr = pInitializeWithWindow->Initialize(hwndProxyCoreWindow);

    if (SUCCEEDED(hr))
        // Verify that our desired spoofed settings are supported.
        SIZE sizeNativeDisplay = {1366, 768};
        SCALE_FACTOR scaleFactor = SCALE_100_PERCENT;
        BOOL fSupported;
        hr = pDesignModeSettings->IsApplicationViewStateSupported(viewState,

    if (SUCCEEDED(hr) && fSupported))
        // Set the spoofed native display size.
        hr = pDesignModeSettings->SetNativeDisplaySize(sizeNativeDisplay);

        if (SUCCEEDED(hr))
            // Set the spoofed scale factor to 100%.
            hr = pDesignModeSettings->SetScaleFactor(SCALE_100_PERCENT);

        if (SUCCEEDED(hr))
            // Set the spoofed application view state to full-screen landscape.
            hr = pDesignModeSettings->SetApplicationViewState(AVS_FULLSCREEN_LANDSCAPE);

        if (SUCCEEDED(hr))
            // Now that all the necessary state has been spoofed, calculate
            // the size that the app should occupy.
            SIZE sizeApplication;
            hr = pDesignModeSettings->ComputeApplicationSize(&sizeApplication);



Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]









Community Additions

© 2014 Microsoft