1. Skynetz's Avatar
    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.
    08-21-2013 07:48 AM
  2. crash1989's Avatar
    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.
    08-21-2013 09:45 AM
  3. Skynetz's Avatar
    What does boilerplate mean ?
    08-22-2013 06:40 AM
  4. crash1989's Avatar
    What does boilerplate mean ?
    umm.. boilerplate code is something which you don't modify just copy paste whatever is given.
    08-22-2013 06:56 AM
  5. Skynetz's Avatar
    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 ?
    08-25-2013 09:47 AM
  6. crash1989's Avatar
    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.
    08-26-2013 02:12 AM
  7. Skynetz's Avatar
    OK, I tried to do something like this:
    WP7 working with XML: reading, filtering and databinding | GeekChamp

    But I get an error here in "data":
    countries.ItemsSource = data;

    It says:
    Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<euroTRIP.MainPage.Country>' to 'System.Collections.IList'. An explicit conversion exists (are you missing a cast?)

    What does this mean ?
    Last edited by Skynetz; 09-01-2013 at 07:34 PM.
    09-01-2013 07:23 PM
  8. Skynetz's Avatar
    09-02-2013 01:43 PM

Similar Threads

  1. Replies: 11
    Last Post: 10-23-2013, 03:24 PM
  2. Supposedly there was a "fix" for "other" storage issue....
    By IMStrugglin in forum Windows Phone 8
    Replies: 10
    Last Post: 10-21-2013, 11:58 PM
  3. Storage capacity with different Ativ S models....
    By wraedeo_hed in forum Samsung ATIV S
    Replies: 4
    Last Post: 08-23-2013, 03:59 PM
  4. Other Storage trolled me!
    By Vaibhav Chauhan in forum Nokia Lumia 820
    Replies: 13
    Last Post: 08-20-2013, 09:28 AM
  5. issue with the storage switch from the phone to SD card !
    By mbockx in forum Huawei Ascend W1
    Replies: 1
    Last Post: 08-20-2013, 07:56 AM
LINK TO POST COPIED TO CLIPBOARD