I'm getting an error "Inconsistent accessibility property type 'List<MasterPageItem' is less accessible than property MainPage.MenuList
This is my code
using ACPlus_MobileEPOS.MenuItems;
using ACPlus_MobileEPOS.Views;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace ACPlus_MobileEPOS {
public partial class MainPage : MasterDetailPage
{
public List<MasterPageItem> MenuList
{
get;
set;
}
public MainPage()
{
InitializeComponent();
MenuList = new List<MasterPageItem>();
MenuList.Add(new MasterPageItem()
{
Title = "EPOS",
TargetType = typeof(pgEPOS)
});
MenuList.Add(new MasterPageItem()
{
Title = "System",
TargetType = typeof(pgSystem)
});
MenuList.Add(new MasterPageItem()
{
Title = "Receipts",
TargetType = typeof(pgReceipts)
});
MenuList.Add(new MasterPageItem()
{
Title = "End of Day",
TargetType = typeof(pgEOD)
});
MenuList.Add(new MasterPageItem()
{
Title = "Reports",
TargetType = typeof(pgReports)
});
MenuList.Add(new MasterPageItem()
{
Title = "Session",
TargetType = typeof(pgSession)
});
navigationDrawerList.ItemsSource = MenuList;
Detail = new NavigationPage((Page)Activator.CreateInstance(typeof(pgEPOS)));
}
private void OnMenuItemSelected(object sender, SelectedItemChangedEventArgs e)
{
var item = (MasterPageItem)e.SelectedItem;
Type page = item.TargetType;
Detail = new NavigationPage((Page)Activator.CreateInstance(page));
IsPresented = false;
}
}
}
I think it's something to do with the class being declared as public partial, but I'm not totally sure,
How do I fix this?