How to set a value to display for bound properties in WPF design mode?

前端 未结 4 2128
隐瞒了意图╮
隐瞒了意图╮ 2020-12-15 11:59

My bound contents are showed as empty string in the UI design-mode. I want to display some faked value for those contents but I don\'t know how to.

Plea

4条回答
  •  不知归路
    2020-12-15 12:43

    You could use the DesignMode property to find out if you are at design time ( http://msdn.microsoft.com/en-us/library/c58hb4bw(vs.71).aspx )

    There are further thoughts but no real conclusions on ways to do it at this question: What approaches are available to dummy design-time data in WPF?

提交回复
热议问题