Closed iurycarlos closed 3 weeks ago
Same strange behavior applies when trying to set a Padding on the TextBox:
<TextBox Padding="20,0,0,0" Text="Testing Padding at 20,0,0,0" />
This is the behavior on WinUI, which appears to match Skia? Am I missing something?
To me, it's actually a Wasm bug, or if https://github.com/microsoft/microsoft-ui-xaml/issues/6324 will be fixed then we can match Skia, but looks like Microsoft views that issue as "By Design" and it's a behavior that's unlikely to change on their side.
So I think, for now, we should make Wasm match WinUI and Skia.
@jeromelaban, @Youssef1313, @ramezgerges what is the status of this issue now that https://github.com/unoplatform/uno/pull/15958 is merged?
15958 is unrelated. The behavior on Skia is matching WinUI. The bad behavior is Wasm
Yes, you are right @Youssef1313, I gave a little try on all platforms with the latest versions and only WASM has the bad behavior here. I adjusted the title of the issue.
Current behavior
The Fluent Textbox "vertical alignment" for its text differs between platforms:
WASM:![image](https://github.com/unoplatform/uno/assets/6876973/8bf70df4-f058-452a-ae8e-250736765bd0)
DESKTOP:![image](https://github.com/unoplatform/uno/assets/6876973/d7187098-fe22-408d-9b65-152b6bf3f80e)
We can observe that as long as we change the FontSize or the Height attributes, the result will be different. Probably it is the alignment in skia that is broken, since WASM version seems correct.
Expected behavior
The alignment should be the same in all platforms
How to reproduce it (as minimally and precisely as possible)
Using: Uno.Templates::5.2.31
Run: dotnet new unoapp -o TextBoxAlignment -preset "recommended" -platforms "android" -platforms "maccatalyst" -platforms "wasm" -platforms "windows" -platforms "desktop" -platforms "ios" -theme-service False -vscode False -pwa False -theme "fluent" -presentation "mvux" -config False -di False -log "none" -nav "blank" -http False -loc False -tests "none" -toolkit False -dsp False -id "com.companyname.TextBoxAlignment" -pub "O=TextBoxAlignment"
Add this code to MainPage.xaml:
Workaround
No response
Works on UWP/WinUI
None
Environment
No response
NuGet package version(s)
No response
Affected platforms
No response
IDE
No response
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response