0

We need to add specific buttons to the left hand side of the NavigationBar in a Xamarin Forms View.

That is currently only supported via a TitleView because ContentPage.ContextItems all appear on the right hand side. TitleView means implementing the whole of the Navigation Bar.

I want my TitleView to look as close as possible to the platform specific Navigation Bar. Does anyone know how to get hold of the

  • Platform title font size
  • Platform foreground colour that would be used for the Title

I've tried all the NamedFont values and whilst they are close they aren't correct.

I have created a custom Label for used in the TitleView. Below are details of what I tried in the respective renderers

iOS:

I had hoped I could use UINavigationBar.UINavigationBarAppearance to obtain the right Font name, size and Color but I cannot get a populated instance of that. I have tried

UINavigationBar.AppearanceWhenContainedIn(typeof(UINavigationController))

but the Appearance class was not populated

Android

I have tried inflating the standard ActionBar layout and reusing the TextView in there but was unable to get that to work

Pat Long - Munkii Yebee
  • 3,592
  • 2
  • 34
  • 68

0 Answers0