I know I can set the EnablePasswordVisibilityToggle on a SfTextInputLayout to mask password characters and add a toggle for the mask, but if the user taps log in with their password unmasked, it doesn't seem that I can force the password characters to be masked while the login is processed. Is there a way to do this, or do I need to use a custom implementation?
|
private void Button_Clicked(object sender, EventArgs e)
{
var inputView = til.InputView as Entry;
if (inputView != null && !inputView.IsPassword)
{
inputView.IsPassword = true;
}
} |
" We can achieve this requirement by accessing the IsPassword property of the InputView (Entry) directly and setting it as true when clicking the login button as mentioned in the below code snippet. "
I have tried this and it does not work. The password remains unmasked. I have ensured that the PropertyChanged event is fired on the view model to force the Entry to update IsPassword
We would like to inform
that the IsPassword property binding of the InputView (Entry) is working
correctly when it is changed dynamically. Could you please confirm whether your
requirement is to mask the password text when clicking the login button. If your requirement is different from this, please revert with more details about
your requirements. It will help us provide an appropriate solution at the
earliest. Please get the tested sample from the below attachment.
Yes, the requirement is to mask the password text when logging in if the user chooses to unmask the password text using the visibility toggle provided by SfTextInputLayout. I have tried dynamically setting IsPassword on the Entry to True upon the user tapping the log in button but the password remains unmasked.
As mentioned earlier, the password text is masked correctly when the login button is clicked. We have prepared a video to show that the IsPassword property binding of the InputView (Entry) is working correctly when it is changed dynamically. Please get the tested video from the below attachment.
If you still face any problem, can you revert us
by modify the previously provided sample along with the replication
steps/video. It will help us provide an appropriate solution at the earliest.
It seems that setting the binding mode to TwoWay was the key difference between my code and your sample. Thanks for providing that. With setting the binding mode on IsPassword to TwoWay, it now works when clicking log in.
We are glad to hear that you have achieved your requirement. Please get in touch with us if you require any further assistance.