我正在使用XAML开发我的第一个Metro应用程序。该应用程序仅供我们公司内部网使用。我有这些问题 -
Windows.Security.Authentication
命名空间,只有Web
和OnlineId
可用。更新 - 通过在Package.appxmanifest file
的功能选项卡中启用企业身份验证,我能够解决#2问题。
答案 0 :(得分:2)
对于第一名:
请使用 Windows.System.UserProfile.UserInformation 类获取所有相关信息
GetDisplayNameAsync()
GetDomainNameAsync()
GetPrincipleNameAsync()
e.g。获取显示名称
if (UserInformation.NameAccessAllowed)
{
string player = await UserInformation.GetDisplayNameAsync();
}