Table of Contents

Class PasswordBox

Namespace
Wpf.Ui.Controls
Assembly
Wpf.Ui.dll

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

DependencyProperty

PasswordChangedEvent

Identifies the PasswordChanged routed event.

public static readonly RoutedEvent PasswordChangedEvent

Field Value

RoutedEvent

PasswordCharProperty

Identifies the PasswordChar dependency property.

public static readonly DependencyProperty PasswordCharProperty

Field Value

DependencyProperty

PasswordProperty

Identifies the Password dependency property.

public static readonly DependencyProperty PasswordProperty

Field Value

DependencyProperty

RevealButtonEnabledProperty

Identifies the RevealButtonEnabled dependency property.

public static readonly DependencyProperty RevealButtonEnabledProperty

Field Value

DependencyProperty

Properties

IsPasswordRevealed

Gets a value indicating whether the password is currently revealed.

public bool IsPasswordRevealed { get; }

Property Value

bool

Password

Gets or sets the actual password (not asterisks).

public string Password { get; set; }

Property Value

string

PasswordChar

Gets or sets the character used to mask the password.

public char PasswordChar { get; set; }

Property Value

char

RevealButtonEnabled

Gets or sets whether the password reveal button is enabled.

public bool RevealButtonEnabled { get; set; }

Property Value

bool

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 TextChangedEventArgs

The arguments that are associated with the TextChanged event.

Events

PasswordChanged

Occurs when the password content changes.

public event RoutedEventHandler PasswordChanged

Event Type

RoutedEventHandler