简体   繁体   中英

navigating from one xaml page to another xaml page in silverlight 4?

I am new to silverlight. I want to go from login page to another page in silverlight 4. How to do that in silverlighr 4. Whats the code in c#?

I have written on login button click

NavigationService n = NavigationService.GetNavigationService(sender as Button);

n.Navigate(new Uri("SelectionPage.xaml", UriKind.Relative));

But I'm getting the following error:

System.Windows.Navigation.NavigationService' does not contain a definition
for 'GetNavigationService'

I'm using System.windows.navigation namespace.

尝试

this.NavigationService.Navigate(new Uri("SelectionPage.xaml", UriKind.Relative));

我以下面的方式使用您的代码进行定义,但仍然无法将该页面this.NavigationService.Navigate(new Uri("Parchase_order_main.xaml", UriKind.Relative));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM