Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can not convert from to Xamarin form page

I am trying to load a class with the click event on my main page but it gives me following error:

Argument 1: cannot convert from 'LocalDataAccess.recipe1' to 'Xamarin.Forms.Page'

This is my code:

private async void recipe_Clicked(object sender, EventArgs e) {
    await Navigation.PushAsync(new recipe1());
}

enter image description here

like image 593
Sam Avatar asked Oct 30 '25 20:10

Sam


1 Answers

recipe1 should using Xamarin.Forms and Inherit from ContentPage, so you should do the following on recipe1:

using Xamarin.Forms;

class Recipe1:ContentPage – Mike Darwish "

This is work fine!


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!