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
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
It works perfectly thanks
Is there a similar solution for SfNumericEntry ?
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.
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
FontAutoScalingEnabled property is available and works as expected in both Debug and Release configurations.- You are using the latest Syncfusion NuGet package (31.1.23).
- The
TargetTypein your style is correctly set toSfDataGridLabelandSfDataGridHeaderLabel. - Clean and rebuild the solution after updating the NuGet packages.
Hi,
I confirm, it works with the latest version 31.1.23.
Thanks.
Best regards.
ENVI
- 7 Replies
- 5 Participants
-
WM Walter Martin
- Nov 6, 2024 10:07 PM UTC
- Oct 16, 2025 06:44 AM UTC