unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
9.06k stars 735 forks source link

GridView does not center on Android and iOS #4682

Open assassin316 opened 3 years ago

assassin316 commented 3 years ago

Current behavior

The GridView control does not center in iOS and Android, works fine in UWP and Wasm.

ANDROID: Android

iOS: iOS

UWP: UWP

Wasm: Wasm

Expected behavior

When specified through templating, the GridView control should properly center itself horizontally and/or vertically.

How to reproduce it (as minimally and precisely as possible)

files.zip

Workaround

None found so far.

Environment

Nuget Package:

Nuget Package Version(s):

Uno.UI 3.0.17

Affected platform(s):

IDE:

Relevant plugins:

Anything else we need to know?

From the last time I test this functionality, centering vertically also had similar problems.

MartinZikmund commented 3 years ago

I think the centering worked for me when I set HorizontalAlignment=Center directly on the GridView, but that is a workaround, the bug is still relevant.

assassin316 commented 3 years ago

@MartinZikmund doing so would have the side effect of having the scroll bars not adjacent to the edge, rather ugly for a UI.

MartinZikmund commented 3 years ago

@MartinZikmund doing so would have the side effect of having the scroll bars not adjacent to the edge, rather ugly for a UI.

Agreed, that is the downside there...