是否有一个的WinRT“IsInDesignMode的财产?有一个、财产、WinRT、IsInDesignMode

2023-09-04 07:12:13 作者:薄唇

我是从Phone 7的尝试口我的应用程序并不能找到检测控制时,在设计模式的方式。

I'm trying to port my application from Phone 7 and can't find the way to detect when control is in Design mode.

明白了 - Windows.ApplicationModel.DesignMode.DesignModeEnabled

Got it - Windows.ApplicationModel.DesignMode.DesignModeEnabled

推荐答案

我使用这样的:

   if (Microsoft.Devices.Environment.DeviceType == DeviceType.Emulator)

_isInDesignMode 
    = Windows.ApplicationModel.DesignMode.DesignModeEnabled

要检查当前的发展态势