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

AbsoluteLayout wrong AutoSize iOS

$
0
0

Hi!

I have a minor problem with AbsoluteLayout AutoSize. I attached a screenshot. On Android there is no problem. Works as expected. On iOS there is a gap. The topBarLayout have bigger height. Any solution? Added background color to widgets. The gap is green, so the layout is wrong, not the image.

`var topBarImage = new Image {
BackgroundColor = Color.FromHex ("FF0000") ,
Source = ImageSource.FromFile ("top.png"),
Aspect = Aspect.AspectFit,
};

AbsoluteLayout.SetLayoutFlags (topBarImage, AbsoluteLayoutFlags.WidthProportional);
AbsoluteLayout.SetLayoutBounds (topBarImage, new Rectangle(0,0,1, AbsoluteLayout.AutoSize));

var topBarLayout = new AbsoluteLayout {
BackgroundColor = Color.FromHex ("204903"),
Children = {
topBarImage,
menuButton
}
};

var wrapper = new StackLayout {
Spacing = 0,
Children = {
topBarLayout,
mainLayout
}
};`


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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