title: How to navigate pages and MainWindow in WPF? Is it possible to use pages instead of several windows?
body: <p>I am totally new to WPF, I mainly use drag&amp;drop, rarely the XAML code itself. In my previous WPF apps, I just used one or two windows.</p>
  
  <p>In a course it is a requirement to build a small app associated with a database.</p>
  
  <p>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?</p>
  
  <p>How to navigate back to the main window?</p>
  
  <p>I have googled a lot, but I didn't find any solutions for my problems so far.</p>
  
  <pre><code> private void BackFromNewCostPage_Click(object sender, RoutedEventArgs e)
          {
              MainWindow main = new MainWindow();
              this.NavigationService.Navigate(main);
          } 
  </code></pre>
  
  <p>I got a NullReferenceException here.</p>