title: How to keep page with full state in navigation wpf app
body: <p>I'm building a WPF app using pages and the navigation service.<br>
  One of the pages take an object as a constructor</p>
  
  <pre><code>Sub New(ByVal o As Object)
      ' This call is required by the Windows Form Designer.
      InitializeComponent()
  
      ....
  </code></pre>
  
  <p>So, to navigate to it I do</p>
  
  <pre><code>    Dim MyPage As New Page1(MyObject)
      MyBase.NavigationService.Navigate(MyPage)
  </code></pre>
  
  <p>The problem occurs when I'm editing something in the page, and go back, and the forward to MyPage i get the following error:</p>
  
  <pre><code> Cannot create object of type 'Page1'. CreateInstance failed, which can be 
   caused by not having a public default constructor for 'Page1'.  
  </code></pre>
  
  <p><strong>What am I doing wrong?</strong></p>