How to navigate from window.xam to page.xaml in wpf using C# code on button click??
I am struggling with with this from last 3 days??
---------------
private void Ok_Click(object sender, RoutedEventArgs e)
{
// Page2 p = new Page2();
//p.NavigationService.Navigate(this);
// NavigationService nav = NavigationService.GetNavigationService(this);
//nav.Navigate(new System.Uri("Page2.xaml", UriKind.RelativeOrAbsolute));
//Page2 p2 = new Page2();
//nav.Navigate(p2);
// Window obj = new Window();
//_mainFrame.NavigationService.Navigate(new Page2());
////_mainFrame.Navigate(new Page2());
}
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Selva GanapathyRank #560 · 4.3K reputationPosted Dec 2, 2014, 1:27 AM EST
Let me know, Why you navigating "Page" here, Are you trying to develop any Windows Phone applications? Also let me know why cant you change the Page instead of Navigating Pages?
Regards,
Selva Ganapathy K