[英]Navigate to another page and then resume app
I'm developing a UWP app for both mobile and PCs. 我正在开发适用于移动和PC的UWP应用程序。 I need to ask for a passcode every time the app start, also when resumed after suspension.
每次应用程序启动时我都需要输入密码,也可以在暂停后恢复。 When the app is resumed I navigate to a pin check page, then, if the passcode is correct I navigate to the page which was shown before suspending.
当应用程序恢复时,我导航到一个pin检查页面,然后,如果密码是正确的,我导航到暂停前显示的页面。 The problem is that I have a page with a textbox and other control, how can I resume the text in TextBox?
问题是我有一个带有文本框和其他控件的页面,如何在TextBox中恢复文本? When I resume the app without using pin page, I have no problem because the content of the page is totally resumed.
当我在不使用pin页面的情况下恢复应用程序时,我没有任何问题,因为页面内容已完全恢复。 Thanks
谢谢
The problem is that I have a page with a textbox and other control, how can I resume the text in TextBox?
问题是我有一个带有文本框和其他控件的页面,如何在TextBox中恢复文本?
You can use UIElement.CacheMode property and Frame.CacheSize property to cache the content of the page. 您可以使用UIElement.CacheMode属性和Frame.CacheSize属性来缓存页面的内容。 You can refer to my another case UWP page state manage .
您可以参考我的另一个案例UWP页面状态管理 。
Or if you're using some templates for example template 10 to develop your app, you can use its own cache method, you can refer to Docs | 或者,如果您使用一些模板作为示例模板10来开发您的应用程序,您可以使用自己的缓存方法,您可以参考文档 Navigation Cache .
导航缓存 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.