What we will Learn

Now if you have read mine previous posts then you can easily create your own windows phone news application in just few steps.

What we will Do Before i tell you further about creating a news app i will assume the following:

  1. You have started your Visual Studio and have create an windows phone empty silverlight application.
  2. You have added two pages , MainPage.xaml and BBC.xaml.
  3. You have place a grid control inside your application.

Before creating a news application for your own country i will tell you something interesting, for creating a news application you just need only one thing known as RSS Feed.  So here’s how we can create it:

1-In your Grid Panel add a button with name of any news channel whose app you want to create as below:

<button x:name="BBC" Click="BBC_click" Content="Read BBC News"/>

2- Now just go to your MainPage.xaml.cs file and fine the event handler for your button and now here you need to navigate your page and you can do this by adding the following code:

 NavigationService.Navigate(new Uri("/BBC.xaml", UriKind.Relative));

Now when you will press the button  this will navigate to your second xaml file named as BBC.xaml.

3- Here in this file just drag and drop a WebBrowser control and add an rrs feed link of BBC in its source, your code must look like this :

<grid x:Name=”LayoutRoot” Background=”White”>
<textBlock Text=”BBC NEWS” FontFamily=”Century Gothic” FontSize=”40″ Foreground=”Green” Margin=”10,10,10,10″/>
<phone:WebBrowser x:Name=”browser” Source=”Place the srs Feed Link from BBC website here” Height=”729″/>

4-Just start your application, modify it according to your needs and enjoy.

I have created a sample application comprised of 6 Pakistani News channel as shown below and have added rrs feed for two news channel other do nothing. For help you can just download it.