开发者

How to store / access a global state object in Silverlight? (phone7)

I'm building an application on Phone 7 using Silverlight and need to maintain some state between pages. I was hoping to store an object in app.cs开发者_如何学编程 and access it from each page but I haven't been able to find any documentation on how to do this.

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

Thanks for your time,

-- Henry


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

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

Is this a reasonable thing to do?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜