设置“器isChecked”只在设计时
问题描述:
财产,我想类似的东西:设置“器isChecked”只在设计时
<UserControl
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"/>
<ToggleButton d:IsChecked="true"/> <!-- Only at design time! -->
</UserControl>
但是,这是行不通的。有另一种方法吗?我正在使用Expression Blend 4.
相关:http://stackoverflow.com/questions/425760/is-there-a-designmode-property-in-wpf我不认为有一个很好的方式来做到这一点,但不幸的是进入代码背后。 – 2014-10-20 13:06:08
你尝试使用默认值吗? – Paparazzi 2014-10-20 13:31:14
我想为设计师使用不同的视图模型是一种方式。 – 2014-10-20 13:32:50