Hi, i'm trying to center an image in a relative layout but i'm failing at it because the size can not be resolved.
When I debug this line
return (parent.Width * .5) + (imagenLogo.Width * .5);
I get that imagenLogo.Width=-1 wich is wrong.
The image is being load correctly becuase I can see it in the screen (just not in the place of the screen that I want).
For creating the image i'm using
var imagenLogo = new Image()
{
Aspect = Aspect.AspectFill,
Source = new FileImageSource() { File = "Logo.png" }
};
What I am doing wrong?