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