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()

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 revealed.

public bool IsPasswordRevealed { get; }

Property Value

bool

Password

Gets or sets currently typed text represented by asterisks.

public string Password { get; set; }

Property Value

string

PasswordChar

Gets or sets character used to mask the password.

public char PasswordChar { get; set; }

Property Value

char

RevealButtonEnabled

Gets or sets a value indicating whether to display the password reveal button.

public bool RevealButtonEnabled { get; set; }

Property Value

bool

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 string

Additional parameters.

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

Event fired from this text box when its inner content has been changed.

public event RoutedEventHandler PasswordChanged

Event Type

RoutedEventHandler

Remarks

It is redirected from inner TextContainer.Changed event.