[英]I want to have a page that collects information from the user, and i want to take that information and use it on other pages and classes
是否有必要将其存储到文件和隔离存储中,或者有其他方法可以做到这一点?
No, you do not have to. 不,您不必。 You can place common data in your 'application', which will be accessible everywhere via the Application.Current property.
您可以在“应用程序”中放置通用数据,可以通过Application.Current属性在任何地方访问它们。 Alternatively, if you use the MVVM pattern, you can set the
DataContext
of the RootFrame
, this will ensure that all pages shares the same data context. 另外,如果您使用MVVM模式,则可以设置
RootFrame
的DataContext
,这将确保所有页面共享相同的数据上下文。
See this blog post I wrote for a nice simple MVVM WP7 example . 请参阅我写的博客文章,其中提供了一个很好的简单MVVM WP7示例 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.