Relative Size to Font and Images

Hi Friends,

I am using Xamarin Forms. I have to give relative size to Font and Images so that text size and image size render across all devices and resolution. Please do needful with proper code snippet.

Thanks,
Prashant N

Answers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    What have you tried so far? What problems is your current approach having?

  • I want set text font size as per device resolution. It needs to be appear almost same across all devices in cross platform.

  • JulienRosenJulienRosen CAMember ✭✭✭✭

    I recommend sticking with the Named font sizes

    Micro, Small, Medium, Large

  • @JulienRosen said:
    I recommend sticking with the Named font sizes

    Micro, Small, Medium, Large

    Can you please share me the code snippet which works fine on different environment like iOs, Android with different resolution?

  • JulienRosenJulienRosen CAMember ✭✭✭✭
    edited February 2017

    <Label FontSize="Large" Text="Test Text" />

    thats all there is to it

  • @JulienRosen said:
    <Label FontSize="Large" Text="Test Text" />

    that all there is to it

    Thanks !! but this will not work on all type of resolution. Size of text get change. Please provide me relevant code which identify the screen resolution and adjust the text size accordingly.

  • JulienRosenJulienRosen CAMember ✭✭✭✭
    edited February 2017

    It is not only the screen resolution you have to worry about. Users can adjust the font size on their device, and this setting has nothing to do with screen size or resolution. If they set their preferred text size to huge, and you are manually setting font size, it will look bad.

    I challenge you to find an existing app that scales text in the way you describe.

  • @JulienRosen said:
    It is not only the screen resolution you have to worry about. Users can adjust the font size on their device, and this setting has nothing to do with screen size or resolution. If they set their preferred text size to huge, and you are manually setting font size, it will look bad.

    I challenge you to find an existing app that scales text in the way you describe.

    Hi,

    Please refer this..

    https://forums.xamarin.com/discussion/24420/font-size-best-practices

    i want exactly this guy wanting.. but somehow the code is not available there. It would be helpful if you provide the similar type of materials.

  • JulienRosenJulienRosen CAMember ✭✭✭✭

    Again, I challenge you to find an existing app that scales text the way you want.

Sign In or Register to comment.