Best way of accessing data on different pages

Posted by Gaz83 on Programmers See other posts from Programmers or by Gaz83
Published on 2012-05-15T22:18:40Z Indexed on 2012/08/28 21:51 UTC
Read the original article Hit count: 237

Filed under:
|

I'm looking for a way to load data into properties/variables etc and have this information accessible to all the pages of my app. I want the information to be loaded via a background thread to keep UI thread free. Some of the pages will have various properties of their controls binding to these global properties.

Here is what I tried.

  • Created a static class. All pages could access the data but can't bind.
  • Changed the static class to a Singleton and used DependencyProperty's. All pages could access data and binding worked fine but cross-threading issues when accessing via background threads.

I have read in various places on this subject but haven't really come up with the best method yet for my situation.

© Programmers or respective owner

Related posts about c#

Related posts about windows-phone-7