1. rexalbel's Avatar
    Ok so I'm kind of scratching around databases because I need them to move forward with developing the apps I have in store and I've watched several videos and done tutorials and am now playing with the tutorials to flesh them out to fit my needs, I also have kind of learned data binding, but not really grasping it to well. I could defiantly not do it entirely on my own yet, but am working on it. I'm finding that playing with the code helps. Anyway what I want to do I'm not sure how to go about doing it so let me explain.

    My app consist of a few major parts, two of which I need to figure out how to do and learning how to do each will help with both.

    Part one will require me to use a preexisting database but would like users to be able to add to it if need be. The structure would be a pivot with some pre defined secion names, and each pivot consists of a list of categories. Each category would then open a single page with another list of items and each item there would open up to the items content. I know what I'll need to do is bind each item to and all that and pass stuff through but I am not sure if using a database is different, I'm not sure how to even add a preinstalled database, but can I bind different parts of it in different places?

    Part two I will create my own database however this one is tricky, essentially, it will be a calendar I will need a pivot with three pages, each will just be different views (day, week, month. (figuring out how to do that will be a hallange in itself....) I might just do a single view if I can't figure out how to make a full calendar, but either way one will click on the date and see a pivot with three sections then each section will have an item and clicking on that will go to item details.... I can't figure out what I would need to do to pass all that info in and how the app will know to create a new instance of the pivot info when the date changes. I do know how to determine date changing, just not sure how to organize my info.

    If all this is confusing I'd be glad to create a dummy app with the layout and formation I am going for. I am studying too so may even figure out some of this myself or through books, or tutorials, but some experienced developer advice would be nice too :)
    08-09-2011 11:39 PM
  2. harish's Avatar
    1. You can make use of observable collection here for binding. When the app starts load the data (section name and categories) into respective observable collection provided both have add/mod/del functionality depending on your requirement and when ever the data changes update the observable collection and don't need to bind again. Apply the observable collection to db immediately or on NavigatingFrom event which will be fired when you are navigating out of the page. And yes you can bind it on specific page depending on the requirement.

    2. In 7.1 you can take advantage of local DB file which is built inside the studio and has linq support to it else make use of SQLite for 7.0 which is saved in Isolated storage. (firefox has a nice plugin to create the schema and add records for SQLite table).
    You can clear the pivot items and add new ones programmatically based on condition.
    Though panorama and pivot items look amazing but do remember performance suffers if there is too much data, so be careful to use it.
    09-08-2011 01:27 PM
LINK TO POST COPIED TO CLIPBOARD