-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Comments
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 |
But in my project it was stable and reproducible, and I can confirm that there were certain conditions that caused problems with "RUN" |
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. |
What I'm actually trying to do is use the two Text parts of the two "runs" to concatenate the number with the unit after the number like (°). |
I suggest to use a converter for it instead tbh. |
Ok, thank you for your advice. I know there are many ways to concatenate this string, and I've used other ways to avoid this problem in my project, but I was just wondering why the "run" concatenation had this problem. |
Describe the bug
Above is my code to verify the problem
This is the normal effect
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
This is everything I use Nuget package
The text was updated successfully, but these errors were encountered: