XML file source from users/appdata/roaming folder
-
Hello, I've bind an XML file to a ListBox. Everything's working right..but the XML file is read as a resource for now...what I would like is being able to read it from the users/appdata/roaming folder! (that's where user's data are saved..so I would like to be able to read from there too!) So, how should I adapt that 'Source=""' part to reference the users/appdata/roaming folder? Hope that I'm clear! Thanks for your help!
-
Hello, I've bind an XML file to a ListBox. Everything's working right..but the XML file is read as a resource for now...what I would like is being able to read it from the users/appdata/roaming folder! (that's where user's data are saved..so I would like to be able to read from there too!) So, how should I adapt that 'Source=""' part to reference the users/appdata/roaming folder? Hope that I'm clear! Thanks for your help!
Amazing, it would never have occurred to me to bind and xml file directly to the UI, I would automatically have loaded the file into a collection in the viewmodel (or code behind) and then bound the collection to the listbox. I should also note I never use xml!
Never underestimate the power of human stupidity RAH
-
Amazing, it would never have occurred to me to bind and xml file directly to the UI, I would automatically have loaded the file into a collection in the viewmodel (or code behind) and then bound the collection to the listbox. I should also note I never use xml!
Never underestimate the power of human stupidity RAH
You've never read the Adam Nathan book then. His RSS reader sample directly uses this trick.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
-
You've never read the Adam Nathan book then. His RSS reader sample directly uses this trick.
*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier
Pete O'Hanlon wrote:
You've never read the Adam Nathan book
You are right, I have read only one Silverlight book to get the basics and the rest of the learning was by doing... The direct binding may have it's uses but I only ever do LOB apps and there is always a database sitting behind the app. I have trouble envisioning an app without a database :-O
Never underestimate the power of human stupidity RAH