Skip to content
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

TextBlock uses Run to concatenate Text values, which in certain cases may not be displayed #17828

Open
ms1094392787 opened this issue Dec 25, 2024 · 3 comments
Labels
area-textprocessing by-design The behavior reported in the issue is actually correct.

Comments

@ms1094392787
Copy link

Describe the bug

1
Above is my code to verify the problem
2
This is the normal effect
3
If there is a problem, you can see that the purple text is displayed normally. But the use of "Run" concatenation is already small

To Reproduce

I am using version "11.2.3". I currently have two views, one is empty and the other is this TextBlock page. This bug occurs when I switch between the two pages using the "RoutedViewHost" control

Expected behavior

No response

Avalonia version

11.2.3

OS

Windows

Additional context

image
This is everything I use Nuget package

@ms1094392787
Copy link
Author

As if the above steps didn't cause the bug to reappear, I used a widget that controls the size of the region. Only when the original size is changed, the "RoutedViewHost" control switch will cause the "RUN" concatenated Text not to display

@ms1094392787
Copy link
Author

But in my project it was stable and reproducible, and I can confirm that there were certain conditions that caused problems with "RUN"

@Gillibald
Copy link
Contributor

Whitespace is always normalized within the TextBlock's content. So you get an extra space for the linebreak within the XAML. Write everything on one line an it should work as you want.

@Gillibald Gillibald added the by-design The behavior reported in the issue is actually correct. label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-textprocessing by-design The behavior reported in the issue is actually correct.
Projects
None yet
Development

No branches or pull requests

3 participants