How to save / access a global state object in Silverlight? (Phone7)

I am building an application on phone 7 using Silverlight, and you need to maintain some state between the pages. I was hoping to save the object in app.cs and access it from every page, but I could not find the documentation on how to do this.

What is the best way to access the same object between multiple pages?

Thank you for your time,

- Henry

+3
source share
1 answer

Answered my own question. I can access the objects in app.cs by simply doing:

App app = (App)Application.Current;
app.whateverMyObjectIsCalled

Is this a reasonable thing?

+3
source

Source: https://habr.com/ru/post/1767015/


All Articles