在 WinRT 中获取当前用户用户、WinRT

2023-09-06 06:26:12 作者:蛇蝎不如你毒

我是一名 C# 开发人员,我已经习惯了旧的 Environment.CurrentUser.现在我需要在我的 Windows 8 Metro 应用程序 (html & js) 中使用它.

I'm a C# developer and I'm used to the good old Environment.CurrentUser. Now I need exaclty that in my Windows 8 Metro app (html & js).

那么我该如何获得呢?

推荐答案

Windows.System.UserProfile.UserInformation.

还有一个使用这个类的例子,帐户图片名称样本.

There's also an example that uses this class, the Account picture name sample .