PasswordBox.IsPasswordRevealButtonEnabled 屬性

定義

取得或設定值,指定 PasswordBox 的視覺 UI 是否包含切換顯示或隱藏具型別字符的按鈕元素。 在 Windows 10 和更新版本中,請改用PasswordRevealMode

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" />

屬性值

Boolean

bool

True 表示顯示密碼顯示按鈕; false 表示不顯示密碼顯示按鈕。 預設值為 false

屬性

備註

Windows 10PasswordRevealMode取代 IsPasswordRevealButtonEnabled,讓您能夠檢視其密碼的更多選項。 會忽略 IsPasswordRevealButtonEnabled 屬性。

這個屬性的值不是決定使用者是否可以看到密碼顯示按鈕的唯一因素。 其他因素包括控制項是否以最小寬度顯示、 PasswordBox 是否具有焦點,以及文字輸入欄位是否至少包含一個字元。

適用於