Define rows/columns of sample container grid upon device orientation change #1317
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 wayauto
is being determined on Androids and iPhones for this column width.My PR has all samples take advantage of the
EsriSampleContainer
style ofGrid
. I've added aVisualStateManager
so that way when in landscape orientation, use2*,*
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 theDynamicResource
. 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 isauto
where the control panel rests, it will minimize the space of the control panel as to maximize the real estate for theGeoView
. If the control panel has a height > 300 on phone and > 500 on tablet, the control panel will use thisMaximumWidthRequest
.Type of change
Platforms tested on
Checklist