9

Windows 8 使用 Live ID 作为用户名。如何在 C# 中获取此 LiveID?

4

3 回答 3

6

Metro apps by design have restricted access to many information they shouldn't really need, and I think this might be one of them.

WinRT gives access to Windows.System.UserProfile.UserInformation class (as CodeCaster suggested), but as I checked, from all the methods there only GetDisplayNameAsync() might return live id (email) and it's only if the first/last name are not set on the account.

(Also, most of the methods in this class require setting Enterprise Authentication capability, which is not really welcome in the Store. And the documentation of the class is currently poor.)

For single-sign-on experience, you might rather use Live Software Development Kit.

于 2012-09-01T22:00:07.860 回答
1

Perhaps Windows.System.UserProfile.UserInformation contain some relevant data.

于 2012-04-23T09:18:05.877 回答