Condividi tramite


UserInformation.NameAccessAllowed Proprietà

Definizione

Consente di verificare se l'app è consentita per accedere alle informazioni dell'utente.

Importante

La classe UserInformation non è supportata in Windows 10 o versioni successive. Usare invece la classe User . Vedere Osservazioni nella documentazione della classe UserInformation .

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

Valore della proprietà

Boolean

bool

True se l'app è consentita l'accesso all'evento AccountPictureChanged e può recuperare le informazioni utente usando i metodi GetAccountPicture,GetDisplayNameAsync, GetFirstNameAsync, GetFirstNameAsync, GetLastNameAsync e GetSessionInitiationProtocolUriAsync. In caso contrario, questa proprietà è false.

Attributi

Commenti

Importante

La classe UserInformation non è supportata in Windows 10 o versioni successive. Usare invece la classe User . Vedere Osservazioni nella documentazione della classe UserInformation .

Se questa proprietà è false, i metodi GetDisplayNameAsync, GetDomainNameAsync, GetFirstNameAsync e GetLastNameAsync restituiscono una stringa vuota, mentre i metodi GetAccountPicture e GetSessionInitiationProtocolUriAsync restituiscono un valore Null.

Si applica a

Vedi anche