开发者

How to get design time data in silverlight/wpf designer?

I want to have my user controls have design time data. If I add the data/datacontext using the constructor, I can see the data in the control from a different view that contains the control.

If I set the DataContext from xaml, I can see it when I'm designing the control, but I see nothing in a control that hosts the control.

So is there any example of how to get design time data to show up in a control if it is being edited, or it's parent is being edited? Or anything that lists the rules of then the constructor is run/not run from the designer? I'm trying to set a 开发者_StackOverflow中文版DesignViewModel with the data, and at runtime use the actual view model.


If I understand your question correctly then it's answered in this question

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜