Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

StartupEventHandler Delegate

Represents the method that will handle the Application.Startup event.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)
public delegate void StartupEventHandler(
	Object sender,
	StartupEventArgs e
)

Parameters

sender
Type: System.Object
The object that raised the event.
e
Type: System.Windows.StartupEventArgs
The event data.

The following code shows how to handle the Startup event.


using System.Windows; // Application, StartupEventArgs

namespace SilverlightApplication
{
    public partial class App : Application
    {
        public App()
        {
            this.Startup += this.Application_Startup;
            InitializeComponent();
        }

        private void Application_Startup(object sender, StartupEventArgs e)
        {
            // Detect when the application starts up.
        }
    }
}


Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.