Action Bar/ Navigation Bar Custom Font

Hi,

I have implemented custom font for my Xamarin forms project. In iOS, it works perfect, with the help of info.plist. In Android, I have declared CustomLabel, CustomEntries and CustomButtons in order to use Custom Font. However, I am not able to create CustomAction Bar to use custom font. Please help.

Answers

  • seanydaseanyda GBMember ✭✭✭✭✭

    Try this

    @RendyDelRosario said:
    A workaround would be doing a custom renderer for the NavigationPage

    public class CustomNavigationBarRenderer : NavigationRenderer
    {

      public override void ViewDidLoad()
      {
          base.ViewDidLoad();
          this.NavigationBar.TintColor = UIColor.Gray;
          this.NavigationBar.BarTintColor = UIColor.White;
       
          this.NavigationBar.TitleTextAttributes=new UIStringAttributes()
          {
              Font = UIFont.FromName("HelveticaNeue-Light",20)
          };
    
      }
    

    }

  • KarthikRamKarthikRam USMember ✭✭

    @ipdavies This works fine for iOS app. There has been no problem. I am not able to overcome the same in Android. Please suggest similar for Android.

  • KarthikRamKarthikRam USMember ✭✭

    Anybody.. Please suggest..

  • MartinRoosMartinRoos USMember ✭✭

    Anyone?

  • 15mgm1515mgm15 USMember ✭✭✭✭

    @MartinRoos Did you ever found a solution to this?

Sign In or Register to comment.