PasswordTextBox Blazor API

PasswordTextBox Properties

AutoFocusboolfalseSpecifies that the element should be focused when the page is loaded.
DisabledboolfalseEnables or disables the element.
EnterKeyBehaviorEnterKeyBehaviorEnterKeyBehavior.SubmitSpecifies the behavior on "Enter" key press. Default mode is "submit".
Formstring""The form that the element is associated with (its "form owner"). The value of the attribute must be the ID of a form element in the same document.
HintobjectN/ASets additional helper text below the element. Appears only when the element is focused.
Labelstring""Sets label above the element. The label is displayed above the input and it's always visible.
Localestring"en"Sets or gets the language. Used in conjunction with the property messages.
MaxLengthintN/ASets or gets the maximum number of characters that the user can enter.
MessagesobjectN/ASets an object with string values, related to the different states of passwords strength.
MinLengthint2Sets or gets the minimum number of characters that the user can enter.
Namestring""Sets or gets the name attribute for the element. Name is used when submiting HTML forms.
PasswordStrengthobjectN/AWith this property the user can set a custom callback function that determines the password strength. The returned string from the function determines the how strong the current password is. The string should be one of the following: 'short', 'weak', 'far', 'good', 'strong'.
Placeholderstring""The placeholder text that is displayed when no value is applied to the element.
RequiredboolfalseSpecifies that the user must fill in a value before submitting a form that contains the element.
RightToLeftboolfalseSets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
SelectAllOnFocusboolfalseSpecifies whether the content of the input will be selected on focus.
ShowPasswordIconboolfalseDetermines whether the password icon is visible.
ShowPasswordStrengthboolfalseDetermines whether a tooltip which shows the password's strength will be shown.
Themestring""Determines the theme. Theme defines the look of the element
TooltipArrowboolfalseDetermines whether Tooltip's arrow will be shown or not.
TooltipDelayint0Determines the delay before the tooltip appears in miliseconds.
TooltipPositionPasswordTextBoxTooltipPositionPasswordTextBoxTooltipPosition.TopDetermines the position of the tooltip.
TooltipTemplatestring"null"Sets a custom template for the content of the tooltip.
UnfocusableboolfalseIf true, the element cannot be focused.
Valuestring""Sets or gets the value of the element.

PasswordTextBox Methods

GetValueAsync()Task<string>'N/A'Gets the &quot;Value&quot; property as Task&lt;string&gt;.
Refreshvoid'N/A'Refreshes the Blazor Component. Performs a layout of the HTML Elements and recalculates the measurements.
Rendervoid'N/A'Re-renders the Blazor Component. This method will make a full re-render.
ResetvoidN/AThe method is used to reset input to it's initial value.
StateHasChangedvoid'N/A'Refreshes the state and Re-renders the Blazor Component, if necessary.

PasswordTextBox Events

NameTypeDescriptionEvent Detail
OnChangeEventCallback<Event>This event is triggered when the value of the element is changed.dynamic oldValue- The previous value of the element before it was changed., dynamic value- The new value of the element.
Changedevent PasswordTextBoxChangedEventHandlerThis event is triggered when the value of the element is changed.PasswordTextBoxChangedEventArgs
OnChangingEventCallback<Event>This event is triggered on each key up event of the TextBox, if the value is changed.dynamic oldValue- The previous value before it was changed., dynamic value- The new value.
Changingevent PasswordTextBoxChangingEventHandlerThis event is triggered on each key up event of the TextBox, if the value is changed.PasswordTextBoxChangingEventArgs