开发者

how to navigate from MainPage.xaml to other page.

开发者 https://www.devze.com 2023-03-23 15:37 出处:网络
In my apllication there are two from.The default form that is the MainPage.xaml and another form called login.xaml.

In my apllication there are two from.The default form that is the MainPage.xaml and another form called login.xaml. I have a button on MainPage.xaml,and my requirement is when the user click that button the Login page should be navigated. This is my first experi开发者_运维百科ence in silverlight can i get that easily understandable code.


this.NavigationService.Navigate(new Uri("/Pagename", UriKind.RelativeOrAbsolute));

In this give your xaml or aspx (/Pagename) only no need to mention .xaml or .aspx


Instead of navigating, you could use a Childwindow

Otherwise, I think, you would have to use the Silverlight navigation framework, but this is quite complex. I'd suggest you to first have a child window pop up if you want to do something!


On Button Event

this.Content=new Login();
0

精彩评论

暂无评论...
验证码 换一张
取 消