How to navigate wpf window1.xaml form to Page.xaml in button click event

Posted by Gow.Net under WPF on 7/25/2013 | Points: 10 | Views : 59881 | Status : [Member] | Replies : 4
HI

i have two xaml file in my wpf application window.xaml and page.xaml.My question is click button in window.xaml oopen page.xaml. how can i write thate code for button click event?

gowthaman8870226416


Responses

Posted by: aswinialuri-19361 on: 7/25/2013 [Member] Starter | Points: 25

Up
0
Down
hi,
refer this link i hope it will clear your doubt
http://theprofessionalspoint.blogspot.in/2013/05/difference-between-window-and-page.html

Mark as Answer if it helps you
Thanks&Regards
Aswini Aluri

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gow.Net on: 8/3/2013 [Member] Starter | Points: 25

Up
0
Down
hi Jitendrasoft09 and Aswinialuri@Gmail.Com

Thanks for yours reply but i got below error how can i solve this
Assembly 'System.Windows.Controls.Navigation' was not found.Verify that you are not missing an assembly reference.

gowthaman8870226416

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ssj_Kumar on: 8/5/2013 [Member] Starter | Points: 25

Up
0
Down
you need to add reference
using System.Windows.Navigation;

and then
this.NavigationService.Navigate(new Uri(<<Page1.xaml>>, UriKind.Relative));

Regards,
Jayakumar Selvakani

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 8/5/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
You should derive the Window.xaml from NavigationWindow to support that type of navigation. Same is explained clearly in the follwoing link
http://mrbool.com/visual-studio-wpf-lesson-3-page-navigation-service-in-wpf-application-using-vs-net/14329

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response