Class PasswordBox
The modified password control.
public class PasswordBox : TextBox, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild
- Inheritance
-
PasswordBox
- Implements
- Inherited Members
Constructors
PasswordBox()
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 revealed.
public bool IsPasswordRevealed { get; }
Property Value
Password
Gets or sets currently typed text represented by asterisks.
public string Password { get; set; }
Property Value
PasswordChar
Gets or sets character used to mask the password.
public char PasswordChar { get; set; }
Property Value
RevealButtonEnabled
Gets or sets a value indicating whether to display the password reveal button.
public bool RevealButtonEnabled { get; set; }
Property Value
Methods
OnPasswordChanged()
Is called when Password property is changing.
protected virtual void OnPasswordChanged()
OnPasswordCharChanged()
Is called when PasswordChar property is changing.
protected virtual void OnPasswordCharChanged()
OnPasswordRevealModeChanged()
protected virtual void OnPasswordRevealModeChanged()
OnTemplateButtonClick(string?)
Triggered by clicking a button in the control template.
protected override void OnTemplateButtonClick(string? parameter)
Parameters
parameter
stringAdditional parameters.
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
Event fired from this text box when its inner content has been changed.
public event RoutedEventHandler PasswordChanged
Event Type
Remarks
It is redirected from inner TextContainer.Changed event.