diff --git a/Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml b/Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml index 83738aa..134c5d2 100644 --- a/Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml +++ b/Source/OxyplotMauiSample/Pages/ExampleBrowser.xaml @@ -20,18 +20,33 @@ 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 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); 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 @@ - -