Skip to content
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

Define rows/columns of sample container grid upon device orientation change #1317

Merged
merged 6 commits into from
Nov 20, 2023

Conversation

williambohrmann3
Copy link
Collaborator

@williambohrmann3 williambohrmann3 commented Nov 7, 2023

Description

On iPhone, the control panel becomes unusable when changing from portrait to landscape device orientation on many samples. The control panel is currently drawn in a column of width auto. There is a difference in the way auto is being determined on Androids and iPhones for this column width.

My PR has all samples take advantage of the EsriSampleContainer style of Grid. I've added a VisualStateManager so that way when in landscape orientation, use 2*,*for column definitions. That way, the control panel has enough room to render controls, allowing samples to be usable in landscape orientation on iOS.

We previously dereferenced the EsriSampleContainer due to a memory leak when accessing the DynamicResource. This issue has been since fixed by the .NET MAUI team via this PR.

Also, this PR adds a MaximumWidthRequest to the control panel style when in portrait mode. Since the row height is auto where the control panel rests, it will minimize the space of the control panel as to maximize the real estate for the GeoView. If the control panel has a height > 300 on phone and > 500 on tablet, the control panel will use this MaximumWidthRequest.

Type of change

  • Bug fix

Platforms tested on

  • MAUI WinUI
  • MAUI Android
  • MAUI iOS
  • MAUI MacCatalyst

Checklist

  • Self-review of changes
  • All changes work as expected on all affected platforms
  • There are no warnings related to changes
  • No unrelated changes have been made to any other code or project files

@williambohrmann3
Copy link
Collaborator Author

Note: targeting v.next as to take advantage of latest fixes in .NET 8.

@williambohrmann3 williambohrmann3 marked this pull request as ready for review November 7, 2023 18:55
@williambohrmann3
Copy link
Collaborator Author

before:
before
after:
after

@williambohrmann3
Copy link
Collaborator Author

before:
before

after:
after

@williambohrmann3 williambohrmann3 merged commit e42e90d into v.next Nov 20, 2023
2 checks passed
@williambohrmann3 williambohrmann3 deleted the wbohr/MAUI-samples-styles branch November 20, 2023 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants