DesignMode DesignMode DesignMode DesignMode Class

Enables you to detect whether your app is in design mode in a visual designer.

Syntax

Declaration

public static class DesignModepublic static class DesignModePublic Static Class DesignMode

Remarks

Visual designers like Microsoft Visual Studio and Blend for Microsoft Visual Studio 2013 enable you to build UI for Windows Store app by editing activated instances of your custom types. Design tools create an instance of your app in a special authoring mode, known as design mode. When your app runs in design mode, it can execute special logic that enables coordination with the visual designer.

Properties summary

Gets a value that indicates whether the process is running in design mode.

Properties

  • DesignModeEnabled
    DesignModeEnabled
    DesignModeEnabled
    DesignModeEnabled

    Gets a value that indicates whether the process is running in design mode.

    public static bool DesignModeEnabled { get; }public static bool DesignModeEnabled { get; }Public Static ReadOnly Property DesignModeEnabled As bool

    Property Value

    • bool
      bool
      bool
      bool

      True if the process is running in design mode; otherwise false.

    Remarks

    Use the DesignModeEnabled property when your custom types require special logic when running in a visual designer. For example, a Windows Library for JavaScript control can query the DesignModeEnabled property to determine whether to display placeholder data instead of live data from a web service.

    Your in-process custom types can check the design mode setting of the current process. Also, internal custom types that are activated in another process can check whether their caller is in design mode.

    Note

    The DesignModeEnabled property is available only in the presence of a developer certificate.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.ApplicationModel.dll