-
Notifications
You must be signed in to change notification settings - Fork 707
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
Button.Content
does not use HorizontalContentAlignment
properly
#7620
Comments
The issue is not with |
@carldebilly do you know what happens here ? |
Playground: https://playground.platform.uno/#161c3915 Looks related to the way the "arrange" is build in Uno. My intuition would be it should take into consideration the desiredSize and readjust according to the actual result from ArrangeOverride(). This mechanism is pretty different in Uno and could explain the behavior observed in this issue. To investigate... |
In the playground, first sample, I can delete the
Bottom line: Wasm appears to behave differently from Android. |
Button.Content
does not use HorizontalContentAlignment
properly
If this is Android/iOS only, then I would suspect it's because of ContentPresenter bypass. |
#18261 may have an impact |
Current behavior
Certain Button Content is not centered. This is even specified in XAML with
HorizontalContentAlignment
just to be sure but the default is alsoCenter
.This appears to be related to the StackPanel which is known to have many issues.Note: StackPanel needs a port from upstream WinUI ASAP like Grid.
Expected behavior
All content should be centered by default.
How to reproduce it (as minimally and precisely as possible)
Repro App:
TestApp.zip
Workaround
Perhaps try a different container/panel such as Grid
Works on UWP/WinUI
Yes
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
NuGet package version(s)
4.0.9
Affected platforms
Android
IDE
Visual Studio 2022
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: