Language

UserInformation.NameAccessAllowed プロパティ

定義

アプリがユーザーの情報へのアクセスを許可されているかどうかを確認できます。

重要

UserInformation クラスは、Windows 10以降ではサポートされていません。 代わりに User クラスを使用してください。 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

プロパティ値

Boolean

bool

アプリが AccountPictureChanged イベントへのアクセスを許可され、GetAccountPicture、GetDisplayNameAsync、GetDomainNameAsync、GetFirstNameAsync、GetLastNameAsync、GetSessionInitiationProtocolUriAsync メソッドを使用してユーザー情報を取得できる場合は True です。 それ以外の場合、このプロパティは false です。

属性

注釈

重要

UserInformation クラスは、Windows 10以降ではサポートされていません。 代わりに User クラスを使用してください。 UserInformation クラスのドキュメントの「解説」を参照してください。

このプロパティが false の場合、 GetDisplayNameAsync、 GetDomainNameAsync、 GetFirstNameAsync、 および GetLastNameAsync メソッドは空の文字列を返し、 GetAccountPicture メソッドと GetSessionInitiationProtocolUriAsync メソッドは null 値を返します。

適用対象

関連項目