Skip to content

PasswordBox class

Defined in

Namespace: CrissCross.Avalonia.UI.Controls Assembly: CrissCross.Avalonia.UI.dll Full name: CrissCross.Avalonia.UI.Controls.PasswordBox Modifiers: public

Summary

        The modified password control. TextProperty contains asterisks OR raw password if IsPasswordRevealed is set to true, PasswordProperty always contains raw password.
        

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net471

Class hierarchy
classDiagram
class PasswordBox
class TextBox
TextBox <|-- PasswordBox

Inherits from: TextBox

Constructors

NameSummary
.ctorInitializes a new instance of the [PasswordBox](# class.

Properties

NameSummary
PasswordGets or sets currently typed text represented by asterisks.
PasswordCharGets or sets character used to mask the password.
IsPasswordRevealedGets a value indicating whether the password is revealed.
RevealPasswordGets or sets a value indicating whether to reveal the password (XAML-friendly alias).
RevealButtonEnabledGets or sets a value indicating whether to display the reveal password button.

Fields

NameSummary
static PasswordPropertyProperty for [Password](#
static PasswordCharPropertyProperty for [PasswordChar](#
static IsPasswordRevealedPropertyProperty for [IsPasswordRevealed](#
static RevealButtonEnabledPropertyProperty for [RevealButtonEnabled](#
static RevealPasswordPropertyProperty for [RevealPassword](# (alias for IsPasswordRevealed for XAML compatibility).
static PasswordChangedEventEvent for "Password has changed".

Methods

NameSummary
OnPropertyChangedCalled when a avalonia property changes on the object.
OnTextChangedCalled when text changes.
OnPasswordChangedIs called when [Password](# property is changing.
OnPasswordCharChangedIs called when [PasswordChar](# property is changing.
OnPasswordRevealModeChangedCalled when password reveal mode changed.
OnTemplateButtonClickTriggered by clicking a button in the control template.

Events

NameSummary
PasswordChangedEvent fired from this text box when its inner content has been changed.
Inherited members