Using idioms we are able to distinguish between a tablet and phone but will it be possible to differentiate between a 5 inch and 7-inch device or say 7 inch and 10-inch devices. Here the scenario is that I need to define the no of columns in the forms UI based on the size, ie in 5 inch device I would need to have 3 columns and in 7-inch device 4 columns and in 10-inch devices say column equals 5 (All the columns counts apply for portrait and in landscape it increases). Could anyone elaborate on how to handle the situation, portrait, and landscape?
Asked
Active
Viewed 76 times
0
-
there isn't a built in helper for this, but you can check the width and height of the UI and derive your answer from that – Jason Mar 19 '18 at 16:45
-
@Jason How to check the device width and height in Xamarin forms? Are you suggesting OnSizeAllocated? – Midhun Kumar Mar 19 '18 at 16:49
-
https://stackoverflow.com/questions/38891654/get-current-screen-width-in-xamarin-forms – Jason Mar 19 '18 at 16:55