Making a Grid App For Windows 8


In the past few days, I have developed apps for Windows 8. I have developed many apps and many of them are Windows Store apps. So I thought I should share my knowledge about developing a grid app for Windows 8. So to begin we will need a Windows 8 OS and Visual Studio 2012. We will be doing our coding in C#.
Step 1
Open Visual Studio 2012 and click on start a new project. Then give the name of the project.
Step 2
Then go to Solution Explorer and open GroupDeatailPage.xaml, GroupedItemPage.xaml and ItemDetailPage.xaml. Now go to the data model in Solution Explorer and open C#sampleDataSource.cs.
Step 3
Now start coding in sampleDataSource.cs. What you have to do is just edit in sampleDataSource.cs; see:
  1. var group1 = new SampleDataGroup("Group-1",  
  2.  "grid app","windows 8  ","Assets/DarkGray.png",  
  3. "this is a simple data app"   
Step 4
Now start editing in the group items of the grid app; see:
  1. group1.Items.Add(new SampleDataItem("Group-1-Item-1",  
  2. "your first Item","first Item's subtitle","Assets/LightGray.png",  
  3.  "description of first Item","content of first Item ",  
  4. group1));  
Step 5
How to add images. Adding images is also simple. You have to add images in assets. Just click on "assets" in the Solution Explorer and click on "add from existing images".
Now, edit in code "Assets/image1.jpg".
Step 6
When you are all done, then click on "local machine" in debug mode.
Now, you are ready with your app. You can now publish it in the Windows Store. You can also change the background color of your app using the following.
Step 1
Open the page you want to change the color; for example, if you want to change the background of GroupDeatailPage.xaml then click on the GroupDeatailPage.xaml in Solution Explorer and click on open in the blend.
Step 2
After the blend is open then click on "grid" in the left part in "objects and timeline".
Step 3
A properties block will appear on the right side. This block will contain many colors. Choose any color from these colors.
Step 4
Debug your code.
In this way, you can make your own data app for Windows 8 and can publish it in the Windows Store.


In this article, we learned about Making a Grid App For Windows 8.