Bagikan melalui


PasswordBox.IsPasswordRevealButtonEnabled Properti

Definisi

Mendapatkan atau mengatur nilai yang menentukan apakah UI visual PasswordBox menyertakan elemen tombol yang beralih memperlihatkan atau menyembunyikan karakter yang di ketik. Di Windows 10 dan yang lebih baru, gunakan PasswordRevealMode sebagai gantinya.

public:
 property bool IsPasswordRevealButtonEnabled { bool get(); void set(bool value); };
/// [get: Windows.Foundation.Metadata.Deprecated("IsPasswordRevealButtonEnabledProperty may be altered or unavailable for releases after Windows 10.0. Instead, use PasswordRevealModeProperty.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [set: Windows.Foundation.Metadata.Deprecated("IsPasswordRevealButtonEnabledProperty may be altered or unavailable for releases after Windows 10.0. Instead, use PasswordRevealModeProperty.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
bool IsPasswordRevealButtonEnabled();

void IsPasswordRevealButtonEnabled(bool value);
/// [get: Windows.Foundation.Metadata.Deprecated("IsPasswordRevealButtonEnabledProperty may be altered or unavailable for releases after Windows 10.0. Instead, use PasswordRevealModeProperty.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
/// [set: Windows.Foundation.Metadata.Deprecated("IsPasswordRevealButtonEnabledProperty may be altered or unavailable for releases after Windows 10.0. Instead, use PasswordRevealModeProperty.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
bool IsPasswordRevealButtonEnabled();

void IsPasswordRevealButtonEnabled(bool value);
public bool IsPasswordRevealButtonEnabled { [Windows.Foundation.Metadata.Deprecated("IsPasswordRevealButtonEnabledProperty may be altered or unavailable for releases after Windows 10.0. Instead, use PasswordRevealModeProperty.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))] get; [Windows.Foundation.Metadata.Deprecated("IsPasswordRevealButtonEnabledProperty may be altered or unavailable for releases after Windows 10.0. Instead, use PasswordRevealModeProperty.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))] set; }
public bool IsPasswordRevealButtonEnabled { [Windows.Foundation.Metadata.Deprecated("IsPasswordRevealButtonEnabledProperty may be altered or unavailable for releases after Windows 10.0. Instead, use PasswordRevealModeProperty.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")] get; [Windows.Foundation.Metadata.Deprecated("IsPasswordRevealButtonEnabledProperty may be altered or unavailable for releases after Windows 10.0. Instead, use PasswordRevealModeProperty.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")] set; }
var boolean = passwordBox.isPasswordRevealButtonEnabled;
passwordBox.isPasswordRevealButtonEnabled = boolean;
Public Property IsPasswordRevealButtonEnabled As Boolean
<PasswordBox IsPasswordRevealButtonEnabled="bool" />

Nilai Properti

Boolean

bool

True untuk menampilkan tombol ungkap kata sandi; false untuk tidak menampilkan tombol ungkap kata sandi. Defaultnya adalah false.

Atribut

Keterangan

Windows 10PasswordRevealMode menggantikan IsPasswordRevealButtonEnabled untuk memberi Anda lebih banyak opsi tentang bagaimana pengguna dapat melihat kata sandi mereka. Properti IsPasswordRevealButtonEnabled diabaikan.

Nilai properti ini bukan satu-satunya faktor yang menentukan apakah tombol ungkap kata sandi terlihat oleh pengguna. Faktor lain termasuk apakah kontrol ditampilkan di atas lebar minimum, apakah Kotak Kata Sandi memiliki fokus, dan apakah bidang entri teks berisi setidaknya satu karakter.

Berlaku untuk