Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Advice on Positioning of Images

$
0
0

Hopefully a really simple question .... :)

After my page is finished loading I get the Width & Height of the Page. I divide the width & height by 100 so with a relative layout can position objects around the screen regardless of the width / height differences of the devices.

However, when I add images to the page the x/y I give becomes their top left point when really it needs to be their center point.

My first question is, is it possible to add images to a relative layout(or absolute layout) so the x/y point given is the center point?

If that isn't possible then what should I do to adjust their position based on the dimensions of the image. When I reposition by moving left by the image pixel width/2 and up by the image pixel Height/2 they don't move into the right places on the various devices.

I understand the pixel width/height isn't exposed but then there must be ways around these problems!


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>