[WinUI] LineHeight
behavior is different from HTML&CSS behavior
#21705
Labels
area-controls-label
Label, Span
platform/windows 🪟
s/triaged
Issue has been reviewed
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Milestone
Description
I tried to set
LineHeight
property to aLabel
and theLabel
's text is not vertically centered as it happens when rendered in a web browser.Steps to Reproduce
Run the sandbox project with this commit MartyIX@ebadf35 (https://github.com/MartyIX/maui/tree/feature/2024-04-08-LineHeight-behavior)
Compare behavior with the following HTML&CSS:
&
(For your convenience check it out here: https://playcode.io/1828826)
You should see (the MAUI app on the left and a rendered HTML&CSS on the right):
and the label
BEHAVIOR DIFFERENCE
is (vertically) aligned differently. In my opinion, it's wrong on Windows. There should be more whitespace above the label.Notes:
Label.LineHeight
property changes the line height of text that wraps onto multiple lines. but I'm not sure if this note covers what this is issue is about.TextBlock.LineHeight
behaves unexpectedly microsoft/microsoft-ui-xaml#9528 as it looks like it might be a WinUI issue.Link to public reproduction project repository
https://github.com/MartyIX/maui/tree/feature/2024-04-08-LineHeight-behavior
Version with bug
8.0.14 SR3.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows, I was not able test on other platforms
Affected platform versions
Windows 10, Windows 11
Did you find any workaround?
No.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: