Skip to content

Replace ListView by CollectionView in sample app#28

Merged
janusw merged 4 commits intooxyplot:developfrom
janusw:net10_cleanup
Feb 16, 2026
Merged

Replace ListView by CollectionView in sample app#28
janusw merged 4 commits intooxyplot:developfrom
janusw:net10_cleanup

Conversation

@janusw
Copy link
Member

@janusw janusw commented Feb 16, 2026

This is a cleanup PR for .NET 10, where ListView is deprecated ...

* 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
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@janusw janusw merged commit 9993602 into oxyplot:develop Feb 16, 2026
3 checks passed
@janusw janusw deleted the net10_cleanup branch February 16, 2026 20:35
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.

1 participant

Comments