There are two pages in my silverlight project: MainPage-default page and SecondViewPage an added Silverlight page.
To navigate from one to another, I’ve overridden the Application_Startup(…)
{
this.RootVisual = mainUI;
mainUI.Children.Add(new MainPage());
}
created a
public static void GotoPage(UserControl nextPage)
{
App app = (App)Application.Current;
app.mainUI.Children.Clear();
//show next page
app.mainUI.Children.Add(nextPage);
}
Then openning the SecondViewPage is simple like:
App.GotoPage(new SecondViewPage());
But what I realy want is to open the second view page in a separage browser window because the removing childer and adding new makes navigation totally outside of the browser (the “back” button is not keeping the prvious page link).
Thanks for suggestions.
V
This is exactly the sort of problem that the navigation framework is designed to solve.
I recommend you clear half an hour and watch this Silverlight TV Video on Channel 9.
Edit
If you must launch a separate window you the navigation framework would still be useful however you would use a standard window navigation. Like this:-