Megosztás a következőn keresztül:


UserInformation.NameAccessAllowed Property

Definition

Allows you to see if your app is allowed to access the user's information.

Important

The UserInformation class is not supported on Windows 10 or later. Use the User class instead. See Remarks in the UserInformation class documentation.

public:
 static property bool NameAccessAllowed { bool get(); };
static bool NameAccessAllowed();
/// [get: Windows.Foundation.Metadata.Deprecated("Use User instead of UserInformation. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.System.UserProfile.UserProfileContract")]
static bool NameAccessAllowed();
public static bool NameAccessAllowed { get; }
public static bool NameAccessAllowed { [Windows.Foundation.Metadata.Deprecated("Use User instead of UserInformation. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.System.UserProfile.UserProfileContract")] get; }
var boolean = UserInformation.nameAccessAllowed;
Public Shared ReadOnly Property NameAccessAllowed As Boolean

Property Value

Boolean

bool

True if your app is allowed access to the AccountPictureChanged event, and is allowed to retrieve user information by using the GetAccountPicture, GetDisplayNameAsync, GetDomainNameAsync, GetFirstNameAsync, GetLastNameAsync, and GetSessionInitiationProtocolUriAsync methods. Otherwise, this property is false.

Attributes

Remarks

Important

The UserInformation class is not supported on Windows 10 or later. Use the User class instead. See Remarks in the UserInformation class documentation.

If this property is false, the GetDisplayNameAsync, GetDomainNameAsync, GetFirstNameAsync, and GetLastNameAsync methods return an empty string, while the GetAccountPicture and GetSessionInitiationProtocolUriAsync methods return a null value.

Applies to

See also