Reputation: 11662
In Silverlight how can I launch / navigate to another page?
Upvotes: 3
Views: 13003
Reputation: 11
You all can also try this
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.(place the page name which You want to navigate);
here in place of Views write the folder name where the page having...
Hope it's also helpful for you all.
Upvotes: 0
Reputation: 1756
To avoid issues with popups being blocked when you use _blank, ensure you call Navigate from the click event of a HyperlinkButton control, as described here:
http://www.tjsblog.net/2010/10/20/opening-a-new-chrome-page-in-silverlight/
Upvotes: 1
Reputation: 590
Assume You are editing code behind file of Page class
this.NavigationService.Navigate(new Uri("/OtherPage.xaml", UriKind.Relative));
Upvotes: 1
Reputation: 3268
To navigate to another page in from another page.
Frame frame =this.parent as Frame;
frame.navigate(new Uri("/Views/Details.xaml"),Uri.Relative);
Note, you must have a frame already in the MainPage.xaml. So other pages are just calling the frame in the parent
Upvotes: 2
Reputation: 11662
System.Windows.Browser.HtmlPage.Window.Navigate(
new Uri( "http://www.google.com" ),
"_blank"
);
You can leave out the target ("_blank") if you just want to navigate within your current browser window.
Upvotes: 9