You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The FontFamily property set in the App.xaml resource dictionary with a key does not apply to Button controls in .NET MAUI 9. While the FontFamily can be set directly on individual Button elements, applying it globally through the resource dictionary using a key is ineffective.
Expected Behavior
The Button should use the FontFamily specified in the style (FontAwesome in the example).
Actual Behavior
The FontFamily define in ResourceDictionary is not applied to the Button. Instead, the button uses the default system font.
Steps to Reproduce
Steps to Reproduce
Create a new .NET MAUI 9 project.
Define a FontFamily in the App.xaml resource dictionary: <Application.Resources> <ResourceDictionary> <Style x:Key="ButtonFontStyle" TargetType="Button"> <Setter Property="FontFamily" Value="FontAwesome" /> </Style> </ResourceDictionary> </Application.Resource
Add a Button to any Page in the app without explicitly setting its FontFamily <Button Text="Test Button" Style="{StaticResource ButtonFontStyle}" />
Link to public reproduction project repository
No response
Version with bug
9.0.30 SR3
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.100 SR10
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
The text was updated successfully, but these errors were encountered:
Hi @Johanna-Victoria. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Description
The FontFamily property set in the App.xaml resource dictionary with a key does not apply to Button controls in .NET MAUI 9. While the FontFamily can be set directly on individual Button elements, applying it globally through the resource dictionary using a key is ineffective.
Expected Behavior
The Button should use the FontFamily specified in the style (FontAwesome in the example).
Actual Behavior
The FontFamily define in ResourceDictionary is not applied to the Button. Instead, the button uses the default system font.
Steps to Reproduce
Steps to Reproduce
<Application.Resources> <ResourceDictionary> <Style x:Key="ButtonFontStyle" TargetType="Button"> <Setter Property="FontFamily" Value="FontAwesome" /> </Style> </ResourceDictionary> </Application.Resource
<Button Text="Test Button" Style="{StaticResource ButtonFontStyle}" />
Link to public reproduction project repository
No response
Version with bug
9.0.30 SR3
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.100 SR10
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: