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.
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.TargetType in your style is correctly set to SfDataGridLabel and SfDataGridHeaderLabel. Hi,
I confirm, it works with the latest version 31.1.23.
Thanks.
Best regards.
ENVI