1

in our .NET MAUI 7 Android App, we've added a custom font and attach it to all possible elements. However, there are some elements for which we have not yet found a way to change the font:

Dialogues

example 1

example 2

Calendar

example

Flyout Bottom Tabbar

example

Context Menu Button

example

How can we define the font for these elements? And, is there a way to define a global font for Android and iOS, which also affects those elements (and could then be overwritten for other elements?

Thank you so much!

David

ToolmakerSteve
  • 18,547
  • 14
  • 94
  • 196
David
  • 21
  • 2
  • Some controls have FontFamily property, all you have to do is style them. Some have to be customized manually. Search for Renderers in Xamarin / Handlers in MAUI. – H.A.H. May 15 '23 at 15:18
  • 1
    David, to be sure I understand, are you saying that if you define a `Style` (in App.xaml) for those elements, there is no way to specify `FontFamily` in the Style? – ToolmakerSteve May 15 '23 at 21:37
  • @ToolmakerSteve as far as I found out, those elements cannot be styled with the regular code in the App.xaml - but instead, Handlers have to be used. Still figuring out how that works though :-( – David May 16 '23 at 10:44
  • I find that you posted it on Q&A. You can refer to the [comment](https://learn.microsoft.com/en-us/answers/questions/1285140/net-maui-7-how-to-set-font-for-some-special-elemen). The content is good. – Jianwei Sun - MSFT May 19 '23 at 09:38

0 Answers0