Xaml Error when creating our own content page

lak1104lak1104 Member ✭✭

I create a content page of my own called BaseContentpage. When I called it from my XAML page. It always gives a compile-time error. it is not issued when I run the app it runs smoothly. I cannot understand the problem.

My base content page

       public abstract class BaseContentPage : ContentPage
      {
          public readonly BaseViewModel BaseViewModel;

       protected bool _isNavigated = false;

           public BaseContentPage(BaseViewModel baseViewModel)
    {
    BaseViewModel = baseViewModel;
          }

public abstract void Navigate(SelectedItemChangedEventArgs e);
protected abstract override void OnAppearing();
protected override void OnDisappearing()
{
    _isNavigated = true;
}
 }

My XAML Page

      <views:BaseContentPage
     xmlns="http://xamarin.com/schemas/2014/forms"
     xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
     x:Class="DipsDemoXaml.Views.PatientListViewPage"
     xmlns:views="clr-namespace:DipsDemoXaml.Views;assembly=DipsDemoXaml.Views"
     Title="{Binding PatientWard.Name}">

it gives a compile time error

Error XLS0414 The type 'views: BaseContentPage' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. DipsDemoXaml PatientListViewPage.xaml

How to fix this compile time error

Best Answer

Answers

Sign In or Register to comment.