I am using carousel view to display images. If I have the device on portrait then everything is ok however once I change to landscape the current picture is cut a bit but once I swipe to the next picture it recalculates and is all ok. / using iOS
Back of the page
protected override void OnSizeAllocated(double width, double height)
{
base.OnSizeAllocated(width, height);
if (width != this.width || height != this.height)
{
this.width = width;
this.height = height;
if (width > height)
{
carousel.HorizontalOptions = LayoutOptions.CenterAndExpand;
carousel.VerticalOptions = LayoutOptions.CenterAndExpand;
outerStack.HeightRequest = 1700;
}
else
{
carousel.HorizontalOptions = LayoutOptions.CenterAndExpand;
carousel.VerticalOptions = LayoutOptions.CenterAndExpand;
outerStack.HeightRequest = 800;
}
}
}
Can you advise plea what am I doing wrong?