Tutorials » Silverlight tutorials »

What is app.xaml ?

This chapter explains the significance of app.xaml file in a Silverlight application.

App.xaml is a file used by Silverlight applications to declare shared resources like brushes, various style objects etc. Also, the code behind file of app.xaml is used to handle global application level events like Application_Startup, Application_Exit and Application_UnhandledException. (Similar to Global.asax file for ASP.NET applications)

When Visual Studio creates the app.xaml file automatically, it creates few event handlers with some default code. You can change the code appropriately.
private void Application_Startup(object sender, StartupEventArgs e)

private void Application_Exit(object sender, EventArgs e)

private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)

For ASP.NET developers, the above code will look familiar. This is similar to the aplication level event handlers in Global.asax.

Next Chapter: Page.xaml file
Previous Chapter: Build and run your Silverlight hello World application
More Chapters: Silverlight Tutorials
More Tutorials: Tutorial Index

Top Contributors
TodayLast 7 Daysmore...

Awards & Gifts

Online Members

Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India