I am totally new to WPF, I mainly use drag&drop, rarely the XAML code itself. In my previous WPF apps, I just used one or two windows.
In a course it is a requirement to build a small app associated with a database.
In my app, there will be a main window and 5 more windows. Is it possible to use WPF pages instead of WPF windows in the same way as windows?
How to navigate back to the main window?
I have googled a lot, but I didn't find any solutions for my problems so far.
private void BackFromNewCostPage_Click(object sender, RoutedEventArgs e)
{
MainWindow main = new MainWindow();
this.NavigationService.Navigate(main);
}
I got a NullReferenceException here.