Dot-Net

WinRT 中是否有“IsInDesignMode”屬性?

  • December 3, 2016

我正在嘗試從 Phone 7 移植我的應用程序,但找不到檢測控制項何時處於設計模式的方法。

知道了 -Windows.ApplicationModel.DesignMode.DesignModeEnabled

我正在使用這個:

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

和這個

_isInDesignMode 
   = Windows.ApplicationModel.DesignMode.DesignModeEnabled

檢查目前的發展情況

引用自:https://stackoverflow.com/questions/7624351