dotnet / maui-samples

Samples for .NET Multi-Platform App UI (.NET MAUI)
https://dot.net/maui
MIT License
3.15k stars 1.28k forks source link

Replace all StackLayout with Grid or Horizontal-/VerticalStackLayout #468

Open jfversluis opened 6 months ago

jfversluis commented 6 months ago

Changes fix two things:

  1. Replace all StackLayouts that contain a CollectionView or ListView with a Grid for better performance
  2. Replace all StackLayouts with the strongly oriented versions: HorizontalStackLayout or VerticalStackLayout

I've excluded 1 or 2 places and they still now use a regular StackLayout because in the code-behind the orientation was changed at runtime depending on the device orientation which is a valid use-case.

Fixes #467

davidbritch commented 6 months ago

This one needs some thought. Will discuss offline with you.