Clean up MAUI .NET 10 warnings#1805
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Cleans up MAUI .NET 10 build warnings by migrating away from APIs that became obsolete (synchronous DisplayAlert/DisplayActionSheet) and from controls that are deprecated (ListView, ViewCell, TextCell, ImageCell, SwitchCell, SelectedItemChangedEventArgs, MediaPicker.PickPhotoAsync).
Changes:
- Renamed
DisplayAlert→DisplayAlertAsyncandDisplayActionSheet→DisplayActionSheetAsyncacross all samples, the Settings page, the SamplePage, and helpers; some fire‑and‑forget calls were rewritten with_ =. - Replaced
ListView(withViewCell/TextCell/ImageCell/SwitchCellitem templates) withCollectionViewplus equivalentDataTemplates, and updated the corresponding code‑behind handler signatures fromSelectedItemChangedEventArgstoSelectionChangedEventArgs(usinge.CurrentSelection.FirstOrDefault()). - Misc.:
MediaPicker.PickPhotoAsync→PickPhotosAsync().FirstOrDefault(); rewroteChangeSublayerVisibilitysublayers page usingCollectionView+Switch; reworkedSimulatedDataSource.ProcessNextObservationto use a nullable‑bool end‑of‑stream signal.
Reviewed changes
Copilot reviewed 169 out of 169 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/MAUI/Maui.Samples/Views/SettingsPage.xaml(.cs) | ListView→CollectionView for offline data list; DisplayAlertAsync. |
| src/MAUI/Maui.Samples/Views/SamplePage.xaml.cs | DisplayActionSheetAsync. |
| src/MAUI/Maui.Samples/Helpers/{ArcGISLoginPrompt,FeedbackPrompt,SampleLoader}.cs | Async API renames. |
| src/MAUI/Maui.Samples/Samples/Analysis/** (4 files) | DisplayAlertAsync renames. |
| src/MAUI/Maui.Samples/Samples/Data/** (~20 files) | Renames; PickPhotosAsync; ListView→CollectionView in EditFeatureAttachments, CreateMobileGeodatabase, ReadShapefileMetadata. |
| src/MAUI/Maui.Samples/Samples/Geometry/** | DisplayAlertAsync renames. |
| src/MAUI/Maui.Samples/Samples/Geoprocessing/** | DisplayAlertAsync renames. |
| src/MAUI/Maui.Samples/Samples/GraphicsOverlay/** | DisplayAlertAsync renames. |
| src/MAUI/Maui.Samples/Samples/Layers/** (~30 files) | Renames; multiple ListView→CollectionView migrations; SimulatedDataSource end‑of‑stream change; ChangeSublayerVisibility UI rebuilt. |
| src/MAUI/Maui.Samples/Samples/Location/** | DisplayAlertAsync renames. |
| src/MAUI/Maui.Samples/Samples/Map/** | Renames; ListView→CollectionView in SearchPortalMaps, DownloadPreplannedMap, MobileMapSearchAndRoute, MapReferenceScale. |
| src/MAUI/Maui.Samples/Samples/MapView/** | DisplayAlertAsync renames. |
| src/MAUI/Maui.Samples/Samples/NetworkAnalysis/** | Renames; RouteAroundBarriers directions list rebuilt with CollectionView. |
| src/MAUI/Maui.Samples/Samples/Scene/, SceneView/ | DisplayAlertAsync renames. |
| src/MAUI/Maui.Samples/Samples/Search/** | DisplayAlertAsync/DisplayActionSheetAsync renames. |
| src/MAUI/Maui.Samples/Samples/Security/** | Renames. |
| src/MAUI/Maui.Samples/Samples/Symbology/** | Renames; SymbolsFromMobileStyle ListViews replaced with CollectionViews. |
| src/MAUI/Maui.Samples/Samples/UtilityNetwork/** | Renames; PerformValveIsolationTrace TerminalPicker switched to CollectionView. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
imalcolm1
reviewed
May 21, 2026
imalcolm1
left a comment
Collaborator
There was a problem hiding this comment.
Looks good! One small regression with the portal maps not scrolling and a couple optional nits
imalcolm1
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Address MAUI build warnings under .NET 10.
Type of change
Platforms tested on
Checklist