[FIXED] Xamarin forms get font size setting


Can I get this font size setting in my main Xamarin project. I like to set this RowHeight value for just the Android’s.


    <RowDefinition Height="{Binding RowHeight}"></RowDefinition>

enter image description here


So you can, you need to account for the platform variations by using the


method, which takes a NamedSize enum to designate the font size, and then the type which could be label, or other view that could be handled. So if you want to base this off of a label with medium size, run:

RowHeight = Device.GetNamedSize(NamedSize.Medium, typeof(Label)) 
+ (consider adding some padding to account for margin etc here);


Answered By – Christopher Richmond

Answer Checked By – Dawn Plyler (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published