First Method:
Steps:
1 - Open
Microsoft Visual Studio Blend 2013 and click on new project. Select XAML (store
apps) and from the list select Blank App (Windows Phone Silverlight) and click
ok.
2 – From the
tools menu drag and drop the button.
3 – Click on
projects, click on your project name and right click the mouse button and
select add new item and select 'Windows Phone Portrait Page' and click ok.
4 – On the
right side of the screen select Data and click on the first upper left ‘+’ icon
and click on the ‘Import Sample Data From XAML’.
5 – Open any
site which has the ‘RSS feed’ unable and copy the Url address from that site
and paste in the Url option and click ok.
6 – On the
right side drag and drop the ‘itemCollection’ on the page.
7 – Double click
on the ‘MainPage.xaml’ from the project solution on the left side and select
button. Right click the mouse while the button is being selected.
8 – From the
options given select the Navigate To and you see the page you just created and
select it.
9 – Save the
project and compile it.
Second Method:
Let’s create a new project and the first thing that we will do is to add a C# class for the RSS Item . We will need to set this up in order to use it and bind it in the next steps , so our class will be like this :
We will move now to the XAML code and add a listbox :
We will move now to the code behind , we will add an event in the Constructor in the load of the first page :
We will code now the event we already added :
Save and run your application now and see the feeds coming from the XML File to the listbox in XAML .
No comments:
Post a Comment