tags:

views:

24

answers:

0

I'm wondering how I can use an XmlDataProvider to provide arbitrary XML data for design time use in Blend 4. I've tried a few ways of specifying it but Blend doesn't pick it up. My UI elements end up blank.

I realize Blend has functionality to generate and manage sample data but that's a lot of overhead for some of the simple user controls I have. I'm looking for something that works inline in the Xaml file (i.e. implicit schema) without a lot of extra files getting generated. Putting an XmlDataProvider in the resources and then doing a d:DataContext to reference it seemed like a good way to go but I can't make it work.

I can't use any of my viewmodel classes for this (like with a d:DesignData or using ObjectDataProvider) because they don't expose setters for all properties. Can't set those properties with design-time data if they're read-only.

How can I build a model in pure Xaml that I can bind to at design time?