form
or web page
. By default, every project have the one .xaml page. If you want to add more xaml pages then you have to follow below steps. App.xaml.cs
as shown in the below figure. App.xaml.cs
file.
[csharp]
private void Application_Startup(object sender, StartupEventArgs e)
{
IDictionary parameters = e.InitParams;
if (parameters == null)
{
this.RootVisual = new DefaultPage();
}
else if (parameters["PageName"] == "Firstpage")
{
this.RootVisual = new Page1();
}
else if (parameters["PageName"] == "Secondpage")
{
this.RootVisual = new Secondpage();
}
else
{
this.RootVisual = new DefaultPage();
}
}
[/csharp]