Display data in Blend

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

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

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, choose Data source options , and then choose Enable When Running Application.

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

Watch a short video: Configure Installed Features 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: Configure Installed Features Create sample data from a class.

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

Show live data in a WPF application

Watch a short video: Configure Installed Features Create an XML data source.

Show live data in a Store or Phone app

See Working with data and files (XAML).

See Also

Creating a UI by using Blend for Visual Studio