Export (0) Print
Expand All

Switching from sample data to live data

Visual Studio 2012

If you bind objects in your application to live data, usually you can see that data only when you run your application (F5), and only if the data is available to you. This can make it difficult to design the appearance of the objects that will display the data.

To display data at design time on the artboard, you can use sample data. Optionally, you can also display sample data when you run your application.

You have two options when you are working with sample data and live data:

  • If your sample data has the same structure (or schema) as the live data that your production application will use, you can simultaneously bind objects to sample data and to live data. This enables Blend for Visual Studio 2012 to display sample data on the artboard and to display live data at run time.

  • If your sample data does not have the same structure as the live data that your production application will use, you must replace the sample data bindings with live data bindings.

To switch from sample data to live data

  1. Disable sample data from displaying in your running application.

    For more information, see Enable live data at run time.

  2. Replace the sample data bindings with live data bindings by dragging items of live data onto the controls that were displaying sample data.

    For more information, see Bind an object to data.

    Tip Tip

    If your live data schema matches your sample data schema, the sample data bindings will still exist, stored in design-time properties. The sample data will display on the artboard and the live data will display in your running application (F5).

Show:
© 2014 Microsoft