Best way of accessing data on different pages
- by Gaz83
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.