Local storage

Skynetz

New member
Nov 15, 2012
226
0
0
Visit site
Hi, I would like to create an app which will have locally stored data. I need to save some pictures and some text. The app itself will have a search menu and a list of "items", if you would click on an item it would open properties of that item, this will be the same to all items, only the data showed will be different. So I don't want to manually write data for all the items (50 or so) and would like to save all the data in an xml file and than pull the info I need, depending on the item I opened. Is an xml the right way (easier) to do this or should I use some database ?

I'm pretty new in developing for WP, so some help would be appreciated.
 

crash1989

New member
Oct 30, 2012
1,491
0
0
Visit site
Hey,

If it is just a list of 50 items you might not need any database. Generally Databases use resources on a server and feed large datasets. You can use local storage to store files if you donot need such ability.

I suggest you use xml (or JSON) to store the list and the attributes of the list items. You should find boilerplate code for this, I suggest you watch this video

Building Apps for Windows Phone 8 Jump Start: (04) Files and Storage on Windows Phone 8 | Building Apps for Windows Phone 8 Jump Start | Channel 9

and here you will find the sample projects for this Windows Phone samples

Hope this helps.
 

Skynetz

New member
Nov 15, 2012
226
0
0
Visit site
OK, let's suppose I have all the data I need for now to test in an xml file, how can I make a LongListSelector to use that data ?
 

crash1989

New member
Oct 30, 2012
1,491
0
0
Visit site
OK, let's suppose I have all the data I need for now to test in an xml file, how can I make a LongListSelector to use that data ?

Use data binding to bind that xml data to the xaml code. Use an observablecollection in case you want the list to change on the fly.

You should watch all the videos in the jump start series I mentioned in my previous post. YOu will be able to create apps in no time then.
 

Members online

Forum statistics

Threads
326,855
Messages
2,248,970
Members
428,545
Latest member
JacqueDupras