-
Notifications
You must be signed in to change notification settings - Fork 487
Description
Is there an existing issue for this?
- I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
First – I’m sorry, I can’t provide a repository. I’m not allowed to upload a repository by company policy, and I’ve created my Github account only to report bugs. But the steps to reproduce the layout problems of the Popup are very straight forward and I hope, you can fix this anyways: The layout of the Popup is broken.
Expected Behavior
The layout of the Popup should work.
Steps To Reproduce
This is, what I want to get:
<StackLayout Padding="10" Spacing="6">
<Button Text="Menüeintrag 1"/>
<Button Text="Menüeintrag 2"/>
<Button Text="Menüeintrag 3"/>
<Button Text="Menüeintrag 4"/>
<Button Text="Menüeintrag 5"/>
<Button Text="Menüeintrag 6"/>
<Button Text="Menüeintrag 7"/>
<Button Text="Menüeintrag 8"/>
<Button Text="Menüeintrag 9"/>
<Button Text="Menüeintrag 10"/>
</StackLayout>
The Popup adjusts its Width to the content – because the Width can be different in different languages or situations. This works fine. But I also want to be able to scroll the items in landscape mode. So I put the StackLayout into a ScrollView:
<ScrollView>
<StackLayout Padding="10" Spacing="6">
<Button Text="Menüeintrag 1"/>
<Button Text="Menüeintrag 2"/>
<Button Text="Menüeintrag 3"/>
<Button Text="Menüeintrag 4"/>
<Button Text="Menüeintrag 5"/>
<Button Text="Menüeintrag 6"/>
<Button Text="Menüeintrag 7"/>
<Button Text="Menüeintrag 8"/>
<Button Text="Menüeintrag 9"/>
<Button Text="Menüeintrag 12"/>
</StackLayout>
</ScrollView>
Now the layout is broken. I’ve reported this bug almost a year ago (#1516), I’ve found a work around. Using DevExpress DXScrollView instead of ScrollView fixes the problem, too. But I think this should work with the MAUI standard controls, as well.
For the second layout issue I sadly don’t have a workaround:
<StackLayout Padding="10" Spacing="6">
<Button Text="Item 1"/>
<Button Text="Item 2"/>
<Button Text="This button has a very long text that is simply cut off in the middle."/>
</StackLayout>
The Popup can’t get wider than 320 Units anymore. The MaximumWidthRequest seems to be limited by this value – hard coded into the Popup control.
Link to public reproduction project repository
https://github.com/CommunityToolkit/Maui
Environment
- .NET MAUI CommunityToolkit: 9.1.0
- OS: Android 14
- .NET MAUI: 8.0.91Anything else?
Thank you very much for help.


