Dela via


DesignMode Class

Definition

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

public ref class DesignMode abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class DesignMode final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public static class DesignMode
Public Class DesignMode
Inheritance
Object Platform::Object IInspectable DesignMode
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Visual designers like Microsoft Visual Studio and Blend for Microsoft Visual Studio 2013 enable you to build UI for UWP 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.

Version history

Windows version SDK version Value added
1709 16299 DesignMode2Enabled

Properties

DesignMode2Enabled

Used to enable or disable user code inside a XAML designer that targets the Windows 10 Fall Creators Update SDK, or later.

DesignModeEnabled

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

Applies to