UserInformation.NameAccessAllowed Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Memungkinkan Anda melihat apakah aplikasi Anda diizinkan untuk mengakses informasi pengguna.
Penting
Kelas UserInformation tidak didukung pada Windows 10 atau yang lebih baru. Gunakan kelas Pengguna sebagai gantinya. Lihat Keterangan dalam dokumentasi kelas 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
Nilai Properti
bool
True jika aplikasi Anda diizinkan mengakses peristiwa AccountPictureChanged , dan diizinkan untuk mengambil informasi pengguna dengan menggunakan metode GetAccountPicture, GetDisplayNameAsync, GetDomainNameAsync, GetFirstNameAsync, GetLastNameAsync, dan GetSessionInitiationProtocolUriAsync . Jika tidak, properti ini salah.
- Atribut
Keterangan
Penting
Kelas UserInformation tidak didukung pada Windows 10 atau yang lebih baru. Gunakan kelas Pengguna sebagai gantinya. Lihat Keterangan dalam dokumentasi kelas UserInformation .
Jika properti ini salah, metode GetDisplayNameAsync, GetDomainNameAsync, GetFirstNameAsync, dan GetLastNameAsync mengembalikan string kosong, sementara metode GetAccountPicture dan GetSessionInitiationProtocolUriAsync mengembalikan nilai null.