Custom layout, override OnSizeRequest returns wrong height?

Hi there!

Been making some customlistview by extending Layout and overriding some of the methods.

For some reason the code below give me the wrong height, the height should be around 45, but it makes it like 24 pixel high instead. I can fix this by hardcode a height in the gridlayout in xaml code.. but this is something i dont want to do..

protected override SizeRequest OnSizeRequest(double widthConstraint, double heightConstraint) { var totalHeight = Children.Sum(child => child.GetSizeRequest(widthConstraint, heightConstraint).Request.Height); return new SizeRequest(new Size(widthConstraint, totalHeight)); }

Sign In or Register to comment.