[Bug] Popup text width problems
See original GitHub issueDescription
There are some problems with the popup, in this case related to texts rendered inside it. If you use a text that is long enough it does not wrap automatically and overrides the width of the popup, completely breaking the visualization.
Reproduction Sample
Steps to Reproduce
- Remove the comment I inserted for the horizontal text width bug;
- Start the project.
Expected Behavior
The text goes new line every time it’s needed.
Actual Behavior
The text doesn’t go new lines.
Basic Information
- Version with issue:
1.0.0
- Last known good version:
1.0.0rc3
- IDE: VS
- Platform Target Frameworks:
- Android:
11.0
- Android:
Workaround
None
Reproduction imagery
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Popup distorts and pushes the page width, how do I fix?
I've recently started learning about css and I've having a problem with the width being altered when the popup is created.
Read more >Popup box and problem in the width on my home page
Hello Everybody. I have 2 problems on my website. I would like to create a pop up box which show to my clients...
Read more >[BUG]? Popup does not wrap content (on Android) #1150
Popup takes almost full width of the display because the text is so long, and the label text has line breaks when necessary....
Read more >Dialog / Popup boxes not displaying content fully?
I have a problem with pop up dialog boxes on Windows 10 not displaying the content ... Under Change only text size, select...
Read more >Font size in pop-up windows is too small. How to change?
The font size settings for display scaling and accessibility do not change the font sizes in pop-up windows in applications.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Confirmed fixed in
CommunityToolkit.Maui v5.2.0
So I manage to find a workaround for it that works in my usage scenario. This is a very hacky solution, but it basically restricts the controls contained in the popup to a max size calculated from the display size.
EDIT: I have modified the code behind to automatically set all children of the MainLayout to have the MaxWidth binding and added the margin calculation
You need a viewmodel that the popup consumes
My alert popup class
my alertpopup view code behind
my alert popup view xaml