Q&A #41 – NavigationService Cannot be used in the Constructor of the page.

Did you know that NavigationService cannot be used in constructor of the Windows Phone Page (PhoneApplicationPage).

Q&A #41 – NavigationService Cannot be used in the Constructor of the page.

When attempting to use the NavigationService within the constructor of the page, you will receive the following error.

Q&A #41 - NavigationService Cannot be used in the Constructor of the page.

“An exception of type ‘System.NullReferenceException’ occurred in MobileOSGeek.DLL but was not handled in user code

Additional information: Object reference not set to an instance of an object.”

It is therefore necessary to wait until the Form’s OnNavigatedTo method is called before one uses the NavigationService within the page.

Leave a Reply