TerminateActivity.ErrorProperty Field


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Represents the DependencyProperty that targets the Error property.

Namespace:   System.Workflow.ComponentModel
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

public static readonly DependencyProperty ErrorProperty

This example illustrates initializing the Error property for a TerminateActivity, and other things discussed elsewhere within this type.

This code example is part of the Suspend and Terminate SDK sample and is from the SuspendAndTerminateWorkflow.Designer.cs file. For more information, see Using Suspend and Terminate.

private void InitializeComponent()
    this.CanModifyActivities = true;
    this.suspend = new System.Workflow.ComponentModel.SuspendActivity();
    this.consoleMessage = new System.Workflow.Activities.CodeActivity();
    this.terminate = new System.Workflow.ComponentModel.TerminateActivity();
    // suspend
    this.suspend.Error = null;
    this.suspend.Name = "suspend";
    // ConsoleMessage
    this.consoleMessage.Name = "consoleMessage";
    this.consoleMessage.ExecuteCode += new System.EventHandler(this.OnConsoleMessage);
    // terminate
    this.terminate.Error = null;
    this.terminate.Name = "terminate";
    // SuspendAndTerminateWorkflow
    this.Name = "SuspendAndTerminateWorkflow";
    this.CanModifyActivities = false;

.NET Framework
Available since 3.0
Return to top