在 Windows Phone 开发中,是否存储了对手机本身至关重要并且可以从任何应用程序访问的任何值/变量?例如功率计数、通用应用程序信息等。如果是这样,我在哪里可以找到这些可访问变量/数据的列表?
1 回答
I don't believe ther are any phone-wide variables you can use. As it would be difficult to maintain continuity throughout the apps that use it, as any could change its value.
You would have to create a server to interchange information between applications that you have made. I believe this is the only way.
And of course you can't access isolatedStorage as it is "Isolated" and only accessible by that application.
As for app-wide variables you can use this:
You can set variables in App.xaml like so:
Public int powerCount { get; set; }
And access them from other pages using:
(App.Current as App).powerCount = 3;
Or of course you could use IsolatedStorage.