Windows Store:How to Add item in GridView

November 12, 2013 0 Comments

  1. Add a GridView control to a parent container using XAML code editor with name attribute.
<GridView x:Name="GridView1" >           


To assign a name to the grid view, set the x:Name attribute to a string value. To refer to a control in code, it must have a name. Otherwise, a name is not required.

2. Add items to the grid view by populating the Items collection or by binding the ItemsSource property to a data source.
<GridView x:Name="GridView1" > 
<x:String> name </x:String>
<x:String> City </x:String>          


Start Screen

Windows Store:How to Add item in GridView
Windows Store:How to Add item in GridView

Apply II method in code file

1. Create a List of String Items and bind with GridView control in main file constructor.

public MainPage()




List<String> itemcoll = new List<String>();



GridView1.ItemsSource = itemcoll;



Jacob Lefore

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google