Universal App Sqlite RRS feed


  • You are typecasting a MainViewModel (the DataContext of the MainView) to a CreateUniversityViewModel, but there is no inheritance relation nor a conversion operator between them. If you want to end up in your null reference check, you need to convert differently:

    protected override void OnNavigatedTo(NavigationEventArgs e)
        var viewModel = DataContext as CreateUniversityViewModel;
        if (viewModel != null)

    • Marked as answer by luna_luna Wednesday, July 2, 2014 3:13 AM
    Monday, June 30, 2014 6:51 AM