FontAutoScalingEnabled Property

How can I force all the text values of the Sfdatagrid to my font size in Android and IOS environment regardless the device setting ?

FontAutoScalingEnabled  = false seems to be not available or I don't know where to write it and if the customer changes the font size in the device settings my font follows that setting

I need to force my font size also in the SfNumericEntry but I don't find the right way also for that.
Thanks


7 Replies

SD Sethupathy Devarajan Syncfusion Team November 7, 2024 10:52 AM UTC

Hi Walter,


You need to force all the text values of the SfDataGrid to your font size in Android and IOS environment regardless the device setting. We achieved this by setting FontAutoScalingEnabled to false in the resource for the SfDataGridLabel and SfDataGridHeaderLabel. We have shared a code snippet and a simple sample for your reference.

Code Snippet:

<ContentPage.Resources>

    <ResourceDictionary>

        <Style TargetType="syncfusion:SfDataGridLabel">

            <Setter Property="FontAutoScalingEnabled" Value="False" />

        </Style>

        <Style TargetType="syncfusion:SfDataGridHeaderLabel">

            <Setter Property="FontAutoScalingEnabled"

                    Value="False" />

        </Style>

     </ResourceDictionary>

</ContentPage.Resources>


Regards,

Sethupathy D.


Attachment: SfDataGridSample_69eeaff1.zip


WM Walter Martin November 7, 2024 08:52 PM UTC

It works perfectly thanks

Is there a similar solution for SfNumericEntry ?




HC Hariharan Chokkalingam Syncfusion Team November 8, 2024 06:44 AM UTC

Hi Walter,

 

We would like to inform you that in SfNumericEntry, the FontAutoScalingEnabled property is already set to False by default. This means you do not need to set it again to enforce a custom font size.

 

However, if you want the SfNumericEntry font size to follow the device’s font settings, you can set FontAutoScalingEnabled to True.

 

Please let us know if you have further questions or concerns.

 

Best regards,

Hariharan.



EV Enzo Varenna replied to Sethupathy Devarajan October 9, 2025 06:58 AM UTC

Hi,

It works in 'Debug'. Have you tried build the solution in 'Release'? 

Error XC0001: Cannot resolve property "FontAutoScalingEnabled" on type "SfDataGridLabel (property missing or missing accessors)".


net8-net9


Best regards,

Envi



MM Muthukumar Madasamy Syncfusion Team October 13, 2025 01:00 PM UTC

Thank you for bringing this to our attention.
We have validated the same scenario in Release mode using .NET 8.0 and .NET 9.0 with the latest .NET MAUI versions (8.0.100 and 9.0.110) and the latest Syncfusion DataGrid NuGet (31.1.23). In our testing, we were not able to reproduce the XC0001 error you mentioned. The FontAutoScalingEnabled property is available and works as expected in both Debug and Release configurations.
Please ensure the following:
  • You are using the latest Syncfusion NuGet package (31.1.23).
  • The TargetType in your style is correctly set to SfDataGridLabel and SfDataGridHeaderLabel
  • Clean and rebuild the solution after updating the NuGet packages.
For your reference, we have attached a working sample tested in Release mode under both .NET 8 and .NET 9 environments.
Could you please try with this sample and confirm if the issue still persists on your end? If it does, kindly share your project or a reproducible sample so that we can investigate further.
Sample Link: SfDataGridSample


Best Regards,
Muthu Kumar Madasamy.




EV Enzo Varenna October 14, 2025 03:05 PM UTC

Hi,

I confirm, it works with the latest version 31.1.23.


Thanks.

Best regards.

ENVI



MM Muthukumar Madasamy Syncfusion Team October 16, 2025 06:44 AM UTC


Thank you for confirming that the issue has been resolved with the latest version 31.1.23. We're glad to hear that everything is working as expected on your end.

Please don't hesitate to reach out if you have any further questions or need assistance with anything else. We're always happy to help!

Best Regards,
Muthu Kumar M.

Loader.
Up arrow icon