Wednesday, July 29, 2009

How To Change the start page Silverlight XAML

Go to app.xaml.cs, find Application_Startup, set your xaml page which you want to run during startup.

app.xaml.cs
private void Application_Startup(object sender, StartupEventArgs e)
{
// this.RootVisual = new Page(); // Default
this.RootVisual = new UserDefinedXaml(); // Changed Xaml, if u add UserDefinedXaml.xaml to your project.
}


app.xaml.vb

Private Sub Application_Startup(ByVal o As Object, ByVal e As StartupEventArgs) Handles Me.Startup
Me.RootVisual = New UserDefinedXaml()
End Sub


No comments:

Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.