BUG: TextBlock does not center correctly when text is surrounded by equal number of spaces #17205
kuiperzone
started this conversation in
General
Replies: 1 comment 7 replies
-
WPF is producing the same which makes sense. Only trailing spaces are ignored. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
NB. Yes I know I should submit it as a bug, but the Github Issue page is not working. The SUBMIT is grayed out.
TextBlock does not seem to be center correctly when text is surround by equal number of spaces both sides, including NBSP characters. I suspect it may be trimming one side.
The screenshot below is generated with the following text:
" H-Center \nV-Middle\nLarger", "font-size:larger"
May seem trivial, but I'm using NBSP characters and nothing would align. Took me two days to figure out the reason.
Perhaps trimming text is intentional behaviour? I'm guessing it is related to a workbreak algorithm? But I think that text should not be trimmed by default after an explicit line break.
Beta Was this translation helpful? Give feedback.
All reactions