[UWP][Textblock] Long string doesn't wrap
See original GitHub issuePlatform
UWP
What platform is your issue or question related to? (Delete other platforms).
- UWP
Author or host
Host
Are you an author (like sending something to Outlook), or a host that is rendering your own cards? If host, please specify the corresponding host (app) name. Cortana on Windows
What version are you using? Ex: NuGet 1.0.2, or latest main, etc… 1.2.7
Details
We have long strings in an AC textblock, when we specify for them to wrap they don’t wrap unless the string has spaces
We are also seeing a strange wrap if there is a + character- this causes the wrap to happen wherever the + character is in the string which could be early on:
This is not an issue for the web renderer, only seems to happen on UWP.
Here is the JSON for this issue:
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"text": "ThisIsAReallyLongTextBlockWithNoSpaces",
"size": "ExtraLarge",
"wrap": true,
"maxLines": 2
}
]
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
TextBlock TextWrapping not wrapping - wpf
Because there's nothing to constrain the width of the TextBlock, it doesn't wrap. If you switch to Vertical orientation then the wrapping works, ......
Read more >TextWrapping Enum (Windows.UI.Xaml) - UWP
Specifies whether text wraps when it reaches the edge of its container. ... the long word and continue the text after the long...
Read more >The TextBlock control
The blue TextBlock uses the TextWrapping property with the value Wrap, to make the TextBlock wrap to the next line whenever it can't...
Read more >RowDetailsTemplate and Text Wrapping in UI for WPF
The problem that I'm having is that if the text is particularly long in the row details view, it won't wrap automatically.
Read more >TextWrapping - 2000 Things You Should Know About WPF
By default, the text displayed in a TextBox does not wrap to multiple lines–even if the TextBox is tall enough to accommodate several...
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 that the main wrapping bug repros in 1.2.7 but not 2.1.0. Looks like this got fixed somewhere along the way. Investigating the + behavior.
The main issue where long words were not wrapping is fixed in the latest version. The breaking on + is the behavior of the UWP TextBlock control, and is not configurable. Although this may not be consistent with Adaptive Cards behavior on other platforms (JavaScript doesn’t do this, for example), it is consistent with text block behavior in UWP generally. Closing this issue.