Xamarin forms navigation

I am having trouble with Xamarin forms navigation, as in, it does not work at all.

My code :

appname.cs

using System;
using Xamarin.Forms;

namespace List
{

    public class App : Application
    {
        public App ()
        {
            MainPage = new NavigationPage (new HomePage ());
        }
    }
}

homepage.xaml.cs

using System;
using Xamarin.Forms;
using System.ComponentModel;
using System.Globalization;
namespace List
{
    public partial class HomePage : ContentPage
    {
        public HomePage ()
        {
            InitializeComponent ();
        }
        public void OnButtonClicked (object sender, EventArgs args)
        {
            Navigation.PushAsync (new DetailsPage ());
        }
    }
}

My intention is obviously to open a main page, have a button on there that goes to a second page upon press.
However this happens instead whenever the button is clicked:

error message

Could not load type 'UIKit.UIView_UITextField' from assembly 'Xamarin.Forms.Platform.iOS'.

Can someone tell me what I’m doing wrong here?


Source: .net

Leave a Reply