Replace ListView by CollectionView in sample app#28
Merged
janusw merged 4 commits intooxyplot:developfrom Feb 16, 2026
Merged
Conversation
* in order to fix warnings like these: warning CS0618: 'ListView' is obsolete: 'ListView is deprecated. Please use CollectionView instead.'
* in order to fix more deprecation warnings
There was a problem hiding this comment.
Pull request overview
This PR modernizes the sample application for .NET 10 by replacing the deprecated ListView control with CollectionView. The changes convert two list-based pages (ExampleBrowser and IssueDemoPage) to use the newer CollectionView API, including updating event handlers from ListView's selection-based events to CollectionView's tap gesture recognizers.
Changes:
- Removed ListView-specific styling from the global styles file
- Converted ExampleBrowser page to use CollectionView with grouping support, including custom group header templates
- Converted IssueDemoPage to use CollectionView with a Grid-based item template for improved layout control
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Source/OxyplotMauiSample/Resources/Styles/Styles.xaml | Removed obsolete ListView style definitions for SeparatorColor and RefreshControlColor |
| Source/OxyplotMauiSample/Pages/IssueDemos/IssueDemoPage.xaml | Replaced ListView with CollectionView, converted TextCell to Grid-based layout with TapGestureRecognizer |
| Source/OxyplotMauiSample/Pages/IssueDemos/IssueDemoPage.xaml.cs | Updated event handler from ItemTapped to TapGestureRecognizer Tapped event, with appropriate sender cast changes |
| Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml | Replaced ListView with CollectionView, added GroupHeaderTemplate for grouped display, and converted TextCell to Label with tap gestures |
| Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml.cs | Updated event handler from ItemSelected to TapGestureRecognizer Tapped event, with appropriate sender cast changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* for better layout and usability
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.
This is a cleanup PR for .NET 10, where
ListViewis deprecated ...