In any screen sizes to build app in xamarin?

0 like 0 dislike
13 views
First encounter with Xamarin and mobile development.

Shoveled documentation and articles, this is what I get:

dp == width_in_px * 160 / dpi
Is the concept of Screen Density. For example, xhdpi, where 1dp == 2px
I installed Xamarin Live Player. Take your Ipad Air2.

In google I find out that dpi == 264px / inch. The resolution of 2048x1536px. Inserted into the formula and say:

width_in_dp == 2048 * 160 / 264. This equals to 1241.

Asked in AbsoluteLayout Label with the point 0 0 and width 1241px. Get a broader element.

Find device metrics from google, for ipad specified Screen Density xhdpi. Given the new information share and get 1024dp. And it fits. https://material.io/devices/

And here's my question:

Why the first formula is incorrect, and on what basis are developed by Xamarin in terms of size? To display correctly on devices of different sizes?
by | 13 views

1 Answer

0 like 0 dislike
The dimensions that you use in Xamarin.Forms - values determined for the platforms of equal type size measurement. UWP is the Effective pixels, for iOS and Android Points to this Density-independent pixels.

A couple of links on this subject:

Work with dimensions
Image sizes
How to know the size in pixels on the platform to con...
by

Related questions

0 like 0 dislike
1 answer
asked May 20, 2019 by 1trofimov
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
110,608 questions
257,186 answers
0 comments
33,629 users