简体   繁体   English

Windows Store App的登录屏幕-最好的方法是什么?

[英]Login Screen for Windows Store App - What would be the best approach?

I've just started developing for Windows Store App and I have an app which requires a login screen. 我刚刚开始为Windows Store App开发,并且我有一个需要登录屏幕的应用。 This login is just to select user records and should not be related to any social network. 该登录名仅用于选择用户记录,不应与任何社交网络相关。 My first approach was create a XAML page and load that page when the app starts, in the App.xaml.cs Then I saw some people using Popups to ask for login, handling the code in the Main.xaml code behind. 我的第一种方法是创建一个XAML页面,并在应用程序启动时在App.xaml.cs中加载该页面。然后我看到一些人使用弹出窗口进行登录,并处理后面的Main.xaml代码中的代码。 What would be the best approach? 最好的方法是什么?

Thanks. 谢谢。

Microsoft give some Guidelines for login. Microsoft提供了一些登录准则。 You can get it here . 你可以在这里得到

Guidelines are not an obligation. 准则不是义务。 It is just classic and valid way to do something. 这只是做某事的经典且有效的方法。 Maybe a pop up is an accepted idea, for now maybe you should follow the "basic" way. 也许弹出窗口是一个可以接受的想法,现在也许您应该遵循“基本”方式。

I think both options are possible. 我认为两种选择都是可能的。 Based on your comments I would suggest build a Login usercontrol that you can use at multiple places. 根据您的评论,我建议您构建一个可在多个地方使用的Login用户控件。 Because you have to login everytime the user starts the app, I would build a loginpage where the app default navigates to from the app.xaml.cs 因为您每次用户启动应用程序时都必须登录,所以我将构建一个登录页面,在该页面中,应用程序默认从app.xaml.cs导航至

In case where the app is resumed and you determine that the user has to login again to continue using the app, I would use an overlay over the page where the user already was and load the usercontrol. 如果恢复了应用程序,并且您确定用户必须再次登录才能继续使用该应用程序,则可以在该用户已经存在的页面上使用一个覆盖图并加载usercontrol。 When the user is logged in again, you can just hide the overlay and the user can continue where he left. 当用户再次登录时,您可以隐藏该叠加层,然后该用户可以继续其离开的位置。

Pro: No logic for remembering where the user came from. 优点:没有记住用户来源的逻辑。

Con: Overlay should be added on every page. 缺点:应该在每个页面上添加覆盖。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 存储网站登录凭据的最佳方法 - Best approach to store login credentials for website 在MVC应用中存储图像的最佳方法 - Best approach to store images in mvc app Windows应用商店中下载和上传文件的最佳用途是什么? - What is the best use of download and upload files in a windows store app? 在Windows 8.1应用程序中存储保存的用户帐户的最佳方法是什么 - What is the best method to store saved user accounts in a windows 8.1 app 在Windows应用商店应用中使用Azure表存储的最佳做法是什么? - What is the best practice to consume Azure table storage in a windows store app? 什么是对文件列表进行多功能检查的最佳方法? - What would be best approach to do multiple functional checking on List of Files? 什么是将关键字存储在数据库中,与语言无关的最佳方法 - what is the best approach to store keywords inside database, language agnostic 在服务器应用程序中存储配置信息的最佳方法是什么? (没有数据库) - What is the best approach to store configuration info in a server application? (No database) 在平板电脑 Windows 应用程序上保留本地数据的最佳方法是什么? - What is the best approach to keep locally data on a tablet windows application? 知道屏幕方向+ Side Windows Store App - Knowing screen orientation + Side Windows Store App
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM