I am creating custom control in Xamarin with a rectangle in it. I provide a bindable property for the rectangle height in my pcl.
When I pass this height in Android and iOS, the height is different for Android device (Nexus 5 running KitKat) and iOS(iPhone 5 running iOS8.4).
I know that there are concepts like density and screen resolution, DPI and PT, but I don't know what happens when I pass 100 as the height for rectangle in iOS and Android.
Does it considers it as DPI/PT? If not, how can I achieve this?
EDIT:
it is Xamarin Forms code.
Portable project has custom control and a BindableProperty in it with datatype as int named as RectHeight
.
Then in customrenderer for Android and iOS, in OnElementChangedProperty method, i write code that assigns height for Rect
in Android and CGRect
in iOS.
EDIT:
I want to provide the dimension as int in custom control and then put the value in Android and iOS such that the height looks same in both the OSes regardless of screen resolution or density. That's why mentioned DPI and PT