Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. XML file source from users/appdata/roaming folder

XML file source from users/appdata/roaming folder

Scheduled Pinned Locked Moved WPF
xmlhelpquestionlearning
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jayme65
    wrote on last edited by
    #1

    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!

    M 1 Reply Last reply
    0
    • J Jayme65

      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!

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      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

      P 1 Reply Last reply
      0
      • M Mycroft Holmes

        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

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #3

        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

        M 1 Reply Last reply
        0
        • P Pete OHanlon

          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

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups