Forum Xamarin Xamarin.Forms

Entry custom font binding isPassword getting reset to default font

In over application we are using custom font. For password, i'm showing option hide/show for the password field this was implemented by binding the bool property to ispassword. when I tap on the show/ hide custom font is reset to default font.

is any work around available for the issue.


  • AndreiMisiukevich_AndreiMisiukevich_ USMember ✭✭✭✭✭

    hmm, just a trick
    create two entries (one under another) And use one for IsPassword = true, and another for IsPassword = false (Change their visibility)

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    That sounds like a genuine bug that you should report on the Issues System.

  • FelipeBruniniFelipeBrunini Member
    edited February 2019

    Hi guys! If anyone ever comes here looking for the answer to this problem.

    The solution for me on Android was
    1. Make a CustomEntryRenderer
    2. Implement code above: †

    if (e.PropertyName == "IsPassword")
      protected void ChangeFont()
        Typeface typeface = Typeface.CreateFromAsset(Context.Assets, "Forza-Medium.otf"); 
        var tfStyle = TypefaceStyle.Normal;
        Control.SetTypeface(typeface, tfStyle);
    (Important, change "Forza-Medium.otf" to your font)
Sign In or Register to comment.