-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MAUI 8] Label measurement is wrong, TailTruncation not working #19218
Comments
@omghb by default the HorizontalStackLayout uses infinite horizontal space to layout its content, so the content inside the HSL is going to extend beyond the Grid container. The reason you're seeing a difference here is related to a difference in the platforms on what platforms will clip the children. This talks about the differences here https://learn.microsoft.com/dotnet/maui/migration/layouts A StackLayout continues in its stacking direction until it runs out of content. It does not subdivide its container along that axis. If you want to limit your content to a constrained space in a direction, you should use another layout such as a Grid. |
Hi @omghb. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate. |
@PureWeen Thanks for the information. For me this behavior is a bit strange:
I would have expected that the parent Grid would "clip" all its children. However, by using Grids we should be able to solve our issues. |
Layout can clip, but it appears since Forms days we never had the default to clip. Setting IsClippedToBounds = true will make it work as you expect: |
Hi @omghb. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
@mattleibow Thanks for the explanation. ✔ The setting |
Description
Steps to Reproduce
MainPage.xaml
with the following content:Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows
Affected platform versions
iOS 17, Android 13, Windows 10
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: