WP8 class inaccessible due to its protection level
<p>All class have public modifier but I got this error : class inaccessible due to its protection level </p>

<pre><code>namespace SamplePOS
{
    public partial class MainPage : PhoneApplicationPage
    {

        MainViewModel mainviewModel;
        // Constructor
        public MainPage()
        {
            InitializeComponent();
            mainviewModel = new MainViewModel();
            DataContext = mainviewModel;
            Loaded += (s, e) =&gt;
            {
                if (!mainviewModel.IsdataLoaded)
                    mainviewModel.LoardOrderData();
            };
        }
.....
}
</code></pre>

<p>when I create the class MainViewModel it just complain that class inaccessible due to its protection level, but the class is declared as public  class MainViewModel : INotifyPropertyChanged</p>
