Skip to main content

PasswordBox

Description​

PasswordBoxExtensions adds Fluent placeholder, reveal, and feedback properties to native PasswordBox. The screenshots show PasswordBoxExtensions inside PasswordBox.

The images show the styled PasswordBox with its placeholder.

PasswordBox in light mode PasswordBox in dark mode

Example usage​

<PasswordBox fluence:PasswordBoxExtensions.PlaceholderText="Password"
fluence:PasswordBoxExtensions.RevealButtonEnabled="True" />

Key properties​

PropertyDefaultPurpose
PlaceholderTextEmpty stringPlaceholder shown for an empty password.
CornerRadius4Rounds the password field.
RevealButtonEnabledtrueEnables the reveal button.
ShowCapsLockIndicatorfalseShows the Caps Lock indicator.
ShowPasswordStrengthfalseShows the strength indicator.
PasswordStrength0Value used by the strength indicator.

State and behavior​

The reveal button shows the password while the pointer holds it down. Keyboard activation toggles the reveal state. Set fluence:PasswordBoxExtensions.RevealButtonEnabled="False" to disable the reveal action and clear any displayed password.

Events​

The native PasswordChanged event reports changes to the password.

See text input focus and selection for the shared WPF editor behavior.

Reference​