WorkflowMarkupSerializer.EventsProperty Field

 
System_CAPS_noteNote

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

Represents an attached DependencyProperty that defines the names for event handler properties.

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

public static readonly DependencyProperty EventsProperty

This property is used only at design time, while programmatically emitting a workflow instance using the object model. It represents XAML that references the event handler, which has not been compiled yet. This property contains a Hashtable, with event name and event handler name-value pairs. After compilation, the event property is associated directly with the handler.

You indirectly access each public property and event of this type by the resolution of a corresponding dependency property. This dependency property is the public static field named XProperty or XEvent, where X is the corresponding property.

The following example shows how to set the value of the EventsProperty dependency property.

CodeActivity code1 = new CodeActivity();
Hashtable eventsHashtable = new Hashtable();
eventsHashtable.Add("ExecuteCode", "methodName1");
code1.SetValue(WorkflowMarkupSerializer.EventsProperty, eventsHashtable);

.NET Framework
Available since 3.0
Return to top
Show: