Events in MAUI TextInputLayout

24 Apr 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:

<inputLayout:SfTextInputLayout  Hint="Password" 
                                PasswordVisibilityToggled="OnPasswordVisibilityToggled">
    <Entry Text="1234"/>
</inputLayout:SfTextInputLayout>
SfTextInputLayout inputLayout = new SfTextInputLayout();
inputLayout.Hint = "Password";
inputLayout.PasswordVisibilityToggled += OnPasswordVisibilityToggled;
inputLayout.Content = new Entry() { Text = "1234" };
private void OnPasswordVisibilityToggled(object sender, PasswordVisibilityToggledEventArgs e)
	{
    	bool passwordVisbility = e.IsPasswordVisible;
	}