This documentation is archived and is not being maintained.

Activity.RaiseEvent Method

Raises an Event associated with the specified dependency property.

Namespace: System.Workflow.ComponentModel
Assembly: System.Workflow.ComponentModel (in system.workflow.componentmodel.dll)

protected internal void RaiseEvent (
	DependencyProperty dependencyEvent,
	Object sender,
	EventArgs e
protected void RaiseEvent (
	DependencyProperty dependencyEvent, 
	Object sender, 
	EventArgs e
protected internal function RaiseEvent (
	dependencyEvent : DependencyProperty, 
	sender : Object, 
	e : EventArgs
Not applicable.



The DependencyProperty associated with this Event.


The Object source of the Event.


The EventArgs associated with the Event.

The following code invokes this method to raise an event which has been defined earlier as a DependencyProperty.

This code example is part of the Send E-mail SDK sample and is from the SendEmailActivity.cs file. For more information, see Send E-mail Activity Sample

protected override ActivityExecutionStatus Execute(ActivityExecutionContext context)
        // Raise the SendingEmail event to the parent workflow or activity
        base.RaiseEvent(SendEmailActivity.SendingEmailEvent, this, EventArgs.Empty);

        // Send the email now

        // Raise the SentEmail event to the parent workflow or activity
        base.RaiseEvent(SendEmailActivity.SentEmailEvent, this, EventArgs.Empty);

        // Retun the closed status indicating that this activity is complete.
        return ActivityExecutionStatus.Closed;
        // An unhandled exception occured.  Throw it back to the WorkflowRuntime.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0