Click here to Skip to main content
15,886,588 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
Is it possible to load a navigation page without clicking on any button or any event for that matter? If so, how?
C#
public void ShowErrorScreen()
{
   NavigationService nav = NavigationService.GetNavigationService(this));
   nav.Navigate(new Uri("ErrorMsg.xaml", UriKind.RelativeOrAbsolute));          
}

Doesn't seem to be working for "this"
Posted
Updated 11-Sep-15 21:33pm
v2

1 solution

 
Share this answer
 
Comments
Sultan Uz Zaman 13-Sep-15 1:04am    
Mine is not a Web App. Before loading a page a few things are being checked. If eveything is ok it shows a page otherwise it shows another page with error information. I can naviagte to a page when I initiate the navigation from a button click event. But I just want to redirect to a page according to my requirement without any click event as stated earlier. Its just loading page on a frame of the main window without any clicking event.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900