I created a CustomLayout which inherits Layout. I created a CustomView class which inherits CustomLayout and added the Label control as child. I wrapped this CustomView in VerticalStackLayout and set the CustomView's VerticalOptions as FillAndExpand.
Usually when we set the VerticalOptions as FillAndExpand, the height of the Content should be finite value. But in this issue, height value came as infinity. This issue occurs in HorizontalStackLayout and AbsoluteLayout as well. This issue did not come in .NET 8 before. But now, it occurs in both .NET 8 and .NET 9.
The attached sample application is in .NET 9.
Steps to Reproduce
Run the attached application
Expected Outcome - based on the VerticalOptions, the layout's children should be displayed
Actual Outcome - layout's children is displayed in the starting position for all VerticalOptions.
Description
I created a CustomLayout which inherits Layout. I created a CustomView class which inherits CustomLayout and added the Label control as child. I wrapped this CustomView in VerticalStackLayout and set the CustomView's VerticalOptions as FillAndExpand.
Usually when we set the VerticalOptions as FillAndExpand, the height of the Content should be finite value. But in this issue, height value came as infinity. This issue occurs in HorizontalStackLayout and AbsoluteLayout as well. This issue did not come in .NET 8 before. But now, it occurs in both .NET 8 and .NET 9.
The attached sample application is in .NET 9.
Steps to Reproduce
Run the attached application
Expected Outcome - based on the VerticalOptions, the layout's children should be displayed Actual Outcome - layout's children is displayed in the starting position for all VerticalOptions.
CustomSample.zip
Link to public reproduction project repository
No response
Version with bug
9.0.0-rc.2.24503.2
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.90 SR9
Affected platforms
Windows, Android, macOS, iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response