xamarin forms navigation in 2.5 xamarin.forms version

I just updated both the xamarin forms version on my visual studio project and Visual studio. My existing project started to throw an error after the update. Since it was a small project. I decided to rewrite the application again. In my earlier application in my MainPage.xaml, I had the following code on the click of the button

Navigation.PushAsync(new gridpage());

and in my gridPage(), I had the following code on the click of the test button

Navigation.PushAsync(new testpage());

now in new Xamarin.forms when i am trying to create a page, i am only getting either xaml page or .cs page. I am not getting both xaml and cs page. The options to create a new page are:

Content View C#
Tabbed and Viewcell

Do I need create two pages separately like Testpage.xaml and testpage.cs? to accomplish the same navigation. I need both code behind page and xaml page.

Thank You.

1 answer

  • answered 2018-03-13 20:19 Manasa

    You need to select the "Forms Xaml Page" Templeate by right click on Project>Add New item>Forms Xaml Page template.

    Then you will able to see both xaml & .cs files.