是否有一些特殊的XML标记或属性可以添加到我的XAML中,以使<UserControl ...>
<Grid>
<IfDesignMode>
<Show-This-Element-Only-In-Design-Mode />
</IfDesignMode>
</Grid>
</UserControl>
上的某些子元素仅出现在设计模式中?像这样的东西?
LEFT JOIN
答案 0 :(得分:0)
using Caliburn.Micro;
public SomeViewModel()
{
if(Execute.InDesignMode)
{
//write some code here
UIelementName.Visibility = System.Windows.Visibility.Hidden
}}
要获得进一步的帮助,请访问this获取更多帮助