Windows 8 使用 Live ID 作为用户名。如何在 C# 中获取此 LiveID?
3 回答
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.
Perhaps Windows.System.UserProfile.UserInformation contain some relevant data.
看看下面的帖子:
http://www.silverlightshow.net/items/Using-the-Live-SDK-in-Windows-8-XAML-C-Metro-Applications.aspx
也关于以前的问题: