Get current user in WinRT

2019-02-14 08:59发布

问题:

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).

So how do I get it?

回答1:

Windows.System.UserProfile.UserInformation.

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