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

Display device location code cleanup #1254

Merged
merged 8 commits into from
Jun 30, 2023

Conversation

williambohrmann3
Copy link
Collaborator

@williambohrmann3 williambohrmann3 commented Jun 20, 2023

Description

While triaging location display bugs, I noticed some areas of improvement for Display device location sample:

  • Uses stack layouts instead of grids.
  • Condenses start and stop button into one control with one click event handler.
  • Shifts away from switch statement and implements dictionary.
  • Updates UI when user pans map to indicate autopan mode change.
  • Accurate readme.

The aim of this PR is to reduce the code verbosity while maintaining readability. Also, ensuring a consistently good UI/UX experience regardless of platform.

Type of change

  • Sample code enhancement

Platforms tested on

  • WPF .NET 6
  • WPF Framework
  • WinUI
  • 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
  • Code is commented and follows .NET conventions and standards
  • Codemaid and XAML styler extensions have been run on every changed file
  • No unrelated changes have been made to any other code or project files
  • Screenshots are correct size and display in description tab (800 x 600 on Windows, MAUI mobile platforms use the MAUI Windows screenshot)

@williambohrmann3 williambohrmann3 marked this pull request as ready for review June 20, 2023 23:46
@williambohrmann3 williambohrmann3 self-assigned this Jun 28, 2023
@williambohrmann3 williambohrmann3 merged commit 5e8de27 into v.next Jun 30, 2023
@williambohrmann3 williambohrmann3 deleted the wbohr/display-device-location branch June 30, 2023 17:22
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