I have the following XAML view, and when the Item is tapped I want to navigate to a detail page:
<ListView x:Name="ProductsList" ItemsSource="{Binding Products}"
HasUnevenRows="True"
SelectedItem="{Binding SelectedProduct}"
ItemTapped="ProductItem_OnTapped">
<ListView.ItemTemplate>
<DataTemplate>
<local1:ProductTemplate />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
This is the handler:
public async void ProductItem_OnTapped(ItemTappedEventArgs e)
{
var productDetailVM = new ProductDetailViewModel(SelectedProduct);
var productDetailView = new ProductDetail();
productDetailView.BindingContext = productDetailVM;
await Application.Current.MainPage.Navigation.PushAsync(productDetailView);
}
The error I am getting is this:
question from:https://stackoverflow.com/questions/66055538/correct-signature-not-found-for-itemtapped-event-handlerEventHandler "ProductItem_OnTapped" with correct signature not found in type "ProductTest.MainPage".