Events in MAUI TextInputLayout
8 Jan 20251 minute to read
PasswordVisibilityToggled Event
The PasswordVisibilityToggled event will be triggered whenever you toggle the password toggle icon in the SfTextInputLayout. The event arguments are of type PasswordVisibilityToggledEventArgs and expose the following property:
- IsPasswordVisible: Its value is defined based on the visibility of the password.
NOTE
Ensure that EnablePasswordVisibilityToggle property is enabled for the
PasswordVisibilityToggledevent to function as expected.
<inputLayout:SfTextInputLayout Hint="Password"
EnablePasswordVisibilityToggle="True"
PasswordVisibilityToggled="OnPasswordVisibilityToggled">
<Entry Text="1234"/>
</inputLayout:SfTextInputLayout>var inputLayout = new SfTextInputLayout();
inputLayout.Hint = "Password";
inputLayout.EnablePasswordVisibilityToggle = true;
inputLayout.PasswordVisibilityToggled += OnPasswordVisibilityToggled;
inputLayout.Content = new Entry() { Text = "1234" };private void OnPasswordVisibilityToggled(object sender, PasswordVisibilityToggledEventArgs e)
{
bool passwordVisbility = e.IsPasswordVisible;
}