Display data in Blend
You can view sample data in your designer as you customize the layout of your pages. You can generate sample data from scratch or by using an existing class. You can also connect to Live data that will appear in your app when you run it.
In this topic:
Generate sample data
Generate sample data from a class
Show live data in a WPF application
Show live data in a Store or Phone app
Generate sample data
To generate sample data, open a XAML document. In the Data panel, choose the Create sample data button, and then choose New Sample Data.
Define the structure of your data in the Data panel, and then bind it to UI elements on any page.
If you want your sample data to appear in your pages when you run the app, click Data source options , and then click Enable When Running Application.
Watch a short video:Create sample data from scratch.
Watch a short video:Mixing up some data binding with Blend.
Generate sample data from a class
If you’ve already created classes that describe the structure of your data, you can generate sample data from them.
To generate sample data from a class, open a XAML document, and then in the Data panel, click the Create sample data button, and then click Create Sample Data from Class.
Watch a short video:Create sample data from a class.
Watch a short video:Mixing up some data binding with Blend.
Show live data in a WPF application
Watch a short video:Create an object data source.
Watch a short video:Create an XML data source.
To learn more, see Data Binding Overview.
Show live data in a Store or Phone app
See Working with data and files (XAML).
Help us evolve our content!
If you’ve found a video or article that’s helped you show sample or live data in Blend, please share that with us. After we review the content, we might add a link to it so that others can benefit from your discovery.
If you’d like to suggest a new video, we’d also like to hear from you. If we receive similar requests from others, we’ll create one as our time and priorities permit.
No one knows your business better than you. So please tell us what resources have helped you to show sample and live data in your pages, and what areas have not been well explained by us, or by anyone in our community, so that we can better evolve our content to help you.
Please share your suggestions here.