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 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Selva GanapathyPosted Dec 2, 2014, 6:27 AM
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