Visual Sharp
Visual Sharp

Reputation: 3996

Xamarin Forms Disable NamedSize font doesn't work

I try run this from Xamarin.Forms.Sample repo https://github.com/xamarin/xamarin-forms-samples Under folder UserInterface/PlatformSpecifics with : ios:Application.EnableAccessibilityScalingForNamedFontSizes="false"

This flag is set to disable scaling of fontsize, however when I go to ios settings Larger Font Size and increase the size, look like that disable doesn't work at all, what do I miss here? or is it a bug?

enter image description here

Upvotes: 0

Views: 393

Answers (1)

ColeX
ColeX

Reputation: 14475

Check this PR , it adds the functionality of disable accessibility sizing for named font sizes .

You can see in that class it affects the font size returned from GetNamedSize method, and check the following screen shot you could find out those controls which will be affected.

enter image description here


So PlatformSpecifics API only works on some specifc controls , it does not affect ViewCell and TableSection in your scenario .


As a workaround , you could replace TextCell with ViewCell and place a Label inside it ,something like

       <ViewCell>
            <Label Text="fdhfihdif">
                <Label.GestureRecognizers>
                    <TapGestureRecognizer Command="{Binding}" CommandParameter="{}"/>
                </Label.GestureRecognizers>
            </Label>
        </ViewCell>

Consider raising feature request on github what you want .

Upvotes: 1

Related Questions