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
精彩评论