Share via


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 data30540d76-7256-43ce-b5d9-4b2edf3d339f 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.

496d7ebc-fe46-42f6-95a8-57b0e5be5d49

If you want your sample data to appear in your pages when you run the app, click Data source options ae1fd260-4f84-420d-b196-45fde357d81d, and then click Enable When Running Application.

05d5356d-91bb-4e6b-b3f7-29b76852c4b3

Watch a short video:Configure Installed FeaturesCreate sample data from scratch.

Watch a short video:Configure Installed FeaturesMixing 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 data30540d76-7256-43ce-b5d9-4b2edf3d339f button, and then click Create Sample Data from Class.

Watch a short video:Configure Installed FeaturesCreate sample data from a class.

Watch a short video:Configure Installed FeaturesMixing up some data binding with Blend.

Show live data in a WPF application

Watch a short video:Configure Installed FeaturesCreate an object data source.

Watch a short video:Configure Installed FeaturesCreate 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.