From 31fbbf65b9fe04bf814e6c3cd509091affb6c37d Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Sat, 14 Feb 2026 21:19:24 +0100 Subject: [PATCH 1/4] OxyplotMauiSample: replace ListView by CollectionView * in order to fix warnings like these: warning CS0618: 'ListView' is obsolete: 'ListView is deprecated. Please use CollectionView instead.' --- .../Pages/IssueDemos/IssueDemoPage.xaml | 23 +++++++++++++------ .../Pages/IssueDemos/IssueDemoPage.xaml.cs | 5 ++-- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Source/OxyplotMauiSample/Pages/IssueDemos/IssueDemoPage.xaml b/Source/OxyplotMauiSample/Pages/IssueDemos/IssueDemoPage.xaml index 91dde47..7e0416b 100644 --- a/Source/OxyplotMauiSample/Pages/IssueDemos/IssueDemoPage.xaml +++ b/Source/OxyplotMauiSample/Pages/IssueDemos/IssueDemoPage.xaml @@ -5,16 +5,25 @@ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:oxyplotMauiSample="clr-namespace:OxyplotMauiSample" Title="Select demo"> - - + - + + + + + + - - + + \ No newline at end of file diff --git a/Source/OxyplotMauiSample/Pages/IssueDemos/IssueDemoPage.xaml.cs b/Source/OxyplotMauiSample/Pages/IssueDemos/IssueDemoPage.xaml.cs index d662d14..8c8be2e 100644 --- a/Source/OxyplotMauiSample/Pages/IssueDemos/IssueDemoPage.xaml.cs +++ b/Source/OxyplotMauiSample/Pages/IssueDemos/IssueDemoPage.xaml.cs @@ -20,9 +20,10 @@ public IssueDemoPage() this.list1.ItemsSource = demoPages; } - private async void ListView_OnItemTapped(object sender, ItemTappedEventArgs e) + private async void CollectionView_OnItemTapped(object sender, TappedEventArgs e) { - var demoInfo = (DemoInfo)e.Item; + var grid = (Grid)sender; + var demoInfo = (DemoInfo)grid.BindingContext; var page = demoInfo.CreatePage(); page.Title = demoInfo.Title; await Navigation.PushAsync(page); From 23b93022dd12d62a1df6b6201c3bf6020c9a15ad Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Sun, 15 Feb 2026 22:18:52 +0100 Subject: [PATCH 2/4] OxyplotMauiSample: replace another ListView by CollectionView * in order to fix more deprecation warnings --- .../Pages/ExampleBrowser.xaml | 29 +++++++++++++------ .../Pages/ExampleBrowser.xaml.cs | 8 ++--- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml b/Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml index 83738aa..787500e 100644 --- a/Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml +++ b/Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml @@ -20,18 +20,29 @@ TextTransform="None" /> - - + + + + + - + - - + + - \ No newline at end of file + diff --git a/Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml.cs b/Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml.cs index dd6c907..baf1b8c 100644 --- a/Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml.cs +++ b/Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml.cs @@ -23,12 +23,10 @@ protected override void OnAppearing() this.BindingContext = _viewModel; } - private async void ListView_OnItemSelected(object sender, SelectedItemChangedEventArgs e) + private async void CollectionView_OnItemTapped(object sender, TappedEventArgs e) { - if (e.SelectedItemIndex < 0) - return; - - var exampleInfo = e.SelectedItem as ExampleInfo; + var lbl = (Label)sender; + var exampleInfo = lbl.BindingContext as ExampleInfo; var page = new PlotViewPage { ExampleInfo = exampleInfo From 07352f173077a15353a6d6387f5ff71face84848 Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Mon, 16 Feb 2026 08:19:05 +0100 Subject: [PATCH 3/4] OxyplotMauiSample: remove ListView from Styles --- Source/OxyplotMauiSample/Resources/Styles/Styles.xaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Source/OxyplotMauiSample/Resources/Styles/Styles.xaml b/Source/OxyplotMauiSample/Resources/Styles/Styles.xaml index 1ec9d55..8ba67fb 100644 --- a/Source/OxyplotMauiSample/Resources/Styles/Styles.xaml +++ b/Source/OxyplotMauiSample/Resources/Styles/Styles.xaml @@ -163,11 +163,6 @@ - -