I was working today on a WPF project in Expression Blend that used Sample Data heavily. I needed to create my own custom sample data format, after searching a bit for a way to extend the Expression Sample Data string formats and not having any luck I decided to dig around on my own. To my suprise this was extremely easy to accomplish so I wanted to post this so that others might be able to benefit from this.
I was building a testing application and I wanted to create sample data for Duration (eg: 00:00:00.0135098). The closest sample I found was Time, but that actually produced an AM/PM time (eg: 12:00:00 AM).
If you open up ‘C:\Program Files\Microsoft Expression\Blend 3\SampleDataResources\en’ on your computer you will see a Data and Images folder inside the Data folder is a CSV file called SampleStrings.csv.
I created a backup first (as you should) and then opened the file in Excel. From there I simply added my new field for Duration and saved the file. After closing Expression Blend and restarting it I opened my sample data and found the new values that I added ready for my use.
In my scenario I had 10 rows of sample data, but I only entered 5 rows of data into the SampleStrings.csv file. The data simple repeated just as I expected.
Thank you to the Expression Blend Team for creating such and easy extension model and I hope this helps someone else along the way.