How Do I Support Accessibility Font Sizes in Xamarin Forms?

后端 未结 3 1728
故里飘歌
故里飘歌 2020-12-09 05:39

For example, I have a label on my page:

var label = new Label
{
    Text = \"Some text here.\",
    LineBreakMode = LineBreakMode.WordWrap,
    FontSize = De         


        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-09 06:22

    For iOS I believe things have changed in Xamarin.Forms since the earlier answers were provided. If a NamedSize value is assigned to the FontSize property of a text element, the text now gets scaled up and down with the value set via the iOS "Larger Text" setting.

    For example, this would result in accessible, scalable text:

提交回复
热议问题