是否有相当于Universal Apps的DesignMode属性?

时间:2014-07-13 18:52:59

标签: c# win-universal-app

在Winforms中,您可以说(使用some slightly unexpected behaviour

if (DesignMode)
{
    // Do something that only happens on Design mode
}

在WPF中,你有

if (DesignerProperties.GetIsInDesignMode(this))
{
    // Do something that only happens on Design mode
}

但我很难为缩小的PCL世界找到类似的选项,即Universal应用程序?

1 个答案:

答案 0 :(得分:5)

对于通用应用,有:

Windows.ApplicationModel.DesignMode.DesignModeEnabled