2008-10-24 74 views

回答

9
System.Windows.Browser.HtmlPage.Window.Navigate(
    new Uri("http://www.google.com"), 
    "_blank" 
    ); 

如果您只想在当前浏览器窗口中导航,则可以省略目标(“_blank”)。

2

从另一个页面导航到另一个页面。

Frame frame =this.parent as Frame; 
frame.navigate(new Uri("/Views/Details.xaml"),Uri.Relative); 

请注意,您必须在MainPage.xaml中有一个框架。 所以其他页面都只是调用框架父

1

假设你正在编辑的代码隐藏页类的文件

this.NavigationService.Navigate(new Uri("/OtherPage.xaml", UriKind.Relative)); 
+0

我认为OP意味着一个网页,而不是XAML页面。 – JavaAndCSharp 2011-12-11 20:30:06

0

你们都还可以试试这个

this.content=new (place the page name which You want to navigate); 

      but this code only works while navigate page having in same folder else You have to write like in given below manner 

this.Content = new Views。(放置您想要导航的页面名称);

  here in place of Views write the folder name where the page having... 

希望它也对你所有的帮助。

相关问题