Generate sample data from class
Use Create Sample Data from Class if your project is using Views and ViewModels and you want to view sample data in your ViewModel at design time. After you have created a ViewModel on the artboard, drag the sample data from the Data panel onto the root of the view to set a design-time data context (the d:DataContext property). You can then design the View using the sample data that has been generated.
To generate sample data from class
To enable the sample data tools, open a XAML document on the artboard in Design view or Split view .
If you do not see the Data panel, make sure that a check mark appears next to Data on the Window menu.
For more information, see Add or remove a workspace panel.
In the Data panel, click Create sample data , and then click Create Sample Data from Class.
In the Create Sample Data from Class dialog box, in the Data source name box, type a name for your data source.
In the Select class list, select the data source assembly that you want. The Select class list displays the default project assemblies in addition to any data source assemblies that you have explicitly added as references in your project.
Tip
To see all the available assemblies, select Show all assemblies.
Tip
Type a term into the Search box to filter the list to include only those assemblies that contain the search term.
Click OK.
Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.