Xamarin Forms: width and height of any given device

Is there any cross-platform way of getting the exact width and the height (minus the status bar) of the device, wheter its a Windows, an Android or an iOS?

Answers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    There are at least a dozen threads for screen size/dimension etc. that I've seen in the last month alone.
    Have you done a search to see if there isn't already some great advice on this before asking people to repeat themselves?

  • yellow_kingyellow_king Member ✭✭

    @ClintStLaurent , yes, I've done my search and found my answer already but since I had little time, I decided to leave my question here anyways. So, when your MainPage (or whatever other name you decided to give to such class) loads, a method called OnPageSizeChanged is automatically executed (wheter your device is vertical or horizontal oriented) and then you have access to Width and Height properties. Those were the properties I was looking for.

Sign In or Register to comment.