Universal Windows Platform (UWP) - Playing With Sample Data Using Blend For Visual Studio

Introduction

Blend for Visual Studio is an awesome tool for designing applications. Most of the times developers don't have real data but they do have meta data for the applications. Microsoft has empowered developers with Blend with which they can develop sample data with meta data. They can create sample data using the menu in Blend by adding values to sample data manually or they also have an option to add sample data from class or Model.

In this tutorial we are going to discuss how you can generate sample data and style it accordingly so that when real data arrives you need not to work more.

Opening Project in Blend

Within Visual Studio 2015 right click over you xaml file and you would get an option "Design in Blend". Just click on that and you would be moved to Blend IDE. After you have done that you are ready to move to the next step.

Opening Project in Blend

Creating Sample Data

As now you have arrived to Blend for VS IDE, you would be able to see Data tab. This data tab is for generating sample data. You can use it to create some sample data. After you have arrived to data tab, click on the database icon and click "Generate New Sample Data". As you do that you would see a menu where you need to give name to the sample data. After you have named sample data you need to set it's scope, either you want that to define it in application's page or you may set it's scope to complete project. As you click create you would see groups and items in data tab with different properties, Congratulations, you have successfully created sample data.

Creating Sample Data

Adding Properties and making it live on application

In Groups or Items you have options to add your own items. You just need to click on the plus sign and you would be able to add properties that may be boolean, image or text. After you have added that, you just need to drag that "Group" or "Items" to your screen and BOOMMM! You would see sample data generated. You can also edit that by clicking on edit values button along create property button.

Adding Properties and making it live in application

Styling your Sample Data

This style of data might not be the one you would have been thinking of. So how you can style your sample data? Well it's really easy, you just need to click on your list, go to edit Additional Template, then move to Edit Generated Items and then to current item. You would notice that scope of objects and timeline has been changed to the item. Now you have full liberty to style the sample data in the way you like.

Styling your Sample Data

Summary

Sample data is a useful feature of Blend for VS for designing your applications quickly. After creating my sample data when I try to execute my application I am able to see similar interface. So when your live data arrives you just need to switch the Data Source and everything is precooked for you.

Hope this learning was worth it, would see you guys next time with another amazing feature of Blend for VS.



Similar Articles