Class PasswordBox
The modified password control.
public class PasswordBox : TextBox, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild
- Inheritance
-
PasswordBox
- Implements
- Inherited Members
Constructors
PasswordBox()
Initializes a new instance of the PasswordBox class.
public PasswordBox()
Fields
IsPasswordRevealedProperty
Identifies the IsPasswordRevealed dependency property.
public static readonly DependencyProperty IsPasswordRevealedProperty
Field Value
PasswordChangedEvent
Identifies the PasswordChanged routed event.
public static readonly RoutedEvent PasswordChangedEvent
Field Value
PasswordCharProperty
Identifies the PasswordChar dependency property.
public static readonly DependencyProperty PasswordCharProperty
Field Value
PasswordProperty
Identifies the Password dependency property.
public static readonly DependencyProperty PasswordProperty
Field Value
RevealButtonEnabledProperty
Identifies the RevealButtonEnabled dependency property.
public static readonly DependencyProperty RevealButtonEnabledProperty
Field Value
Properties
IsPasswordRevealed
Gets a value indicating whether the password is currently revealed.
public bool IsPasswordRevealed { get; }
Property Value
Password
Gets or sets the actual password (not asterisks).
public string Password { get; set; }
Property Value
PasswordChar
Gets or sets the character used to mask the password.
public char PasswordChar { get; set; }
Property Value
RevealButtonEnabled
Gets or sets whether the password reveal button is enabled.
public bool RevealButtonEnabled { get; set; }
Property Value
Methods
OnIsPasswordRevealedChanged()
Called when the IsPasswordRevealed property changes.
protected virtual void OnIsPasswordRevealedChanged()
OnPasswordChanged()
Called when the Password property changes.
protected virtual void OnPasswordChanged()
OnPasswordCharChanged()
Called when the PasswordChar property changes.
protected virtual void OnPasswordCharChanged()
OnTemplateButtonClick(string?)
Triggered by clicking a button in the control template.
protected override void OnTemplateButtonClick(string? parameter)
Parameters
parameter
string
OnTextChanged(TextChangedEventArgs)
Is called when content in this editing control changes.
protected override void OnTextChanged(TextChangedEventArgs e)
Parameters
e
TextChangedEventArgsThe arguments that are associated with the TextChanged event.
Events
PasswordChanged
Occurs when the password content changes.
public event RoutedEventHandler PasswordChanged