Open JTOne123 opened 1 month ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Description
I struggle with Xamarin -> MAUI conversion and stuck with the issue in
Compatibility.Layout<T>
, it doesn't display anything.The MAUI project based on .NET 8.0 and Microsoft.Maui.Controls.Compatibility 8.0.21
I expect to see a label (the same code works on xamarin forms).
Maui and Xamarin code and screenshots are below.
What am I missing?
Here is my MAUI code (which doesn't work):
My custom layout control:
XAML:
MauiProgram:
Android result: no text label
Windows result: Throw an exception. (I think it's a different bug, I can reproduce it only on Windows)
The handler's MauiContext cannot be null.
XAMARIN FORMS EXAMPLE
The very same code on the Xamarin Forms works fine.
I expected to see this. This is screenshots from the same code but on Xamarin Forms.![enter image description here](https://i.sstatic.net/0kjL6NnC.png)
here is my initial ask on https://stackoverflow.com/questions/78571366/maui-compatibility-layoutt-doesnt-display-anything
Steps to Reproduce
Please copy code snippets from
Description
Link to public reproduction project repository
No response
Version with bug
8.0.20 SR4
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows
Affected platform versions
net8.0-windows10.0.19041.0, android14
Did you find any workaround?
Hi, I want to share update with my issue
I find the workaround for it; I must call explicitly
.Measure(
method for each child.Relevant log output
No response