Android font weight4/13/2023 I’ve come across some interesting behavior using one of these combinations – but before going into detail, let’s set up a sample application to reproduce the issue!Ĭreate a simple Xamarin.Forms app including one page, that simply displays four lines of text, which only differ by the FontSize and FontAttributes used:īefore looking at the result, let’s streamline our expectations of the output of this page: By looking at the code, you’d probably expect the first two and the last two lines of code respectively looking the same except for the font weight. Of course, the NamedSize approach can still be combined with other font-related settings, such as font family, font weight, or decorations. The latter comes in handy when targeting multiple platforms (which is one of the key reasons for using Xamarin.Forms in the first place), since text size is automatically adjusted to the according target platform and device, without manually specifying different font sizes for different platforms. FontSize="14") or by using the common keywords specified in the enumeration (e.g. within a Label: Either as fixed values (e.g. The Xamarin.Forms framework offers two options for specifying the font size of text to be displayed, e.g.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |