How to use d:DesignInstance with types that don't have default constructor?

前端 未结 3 1161
轮回少年
轮回少年 2020-12-13 14:03

I am binding a textbox to an object, like so:

  

        
3条回答
  •  时光说笑
    2020-12-13 14:44

    You could add a default constructor to your VM. It could then check if it is in design time and set appropriate design-time values for its properties.

提交回复
热议问题