Design-time-only background color in WPF?

前端 未结 5 950
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 03:53

In WPF XAML there is the convenient DesignHeight and DesignWidth, for instance in code as



        
5条回答
  •  隐瞒了意图╮
    2020-12-13 04:30

    My answer was found here: Black Background for XAML Editor. There are a number of choices including checking System.ComponentModel.DesignerProperties.GetIsInDesignMode(this) at runtime.

提交回复
热议问题