This documentation is archived and is not being maintained.

Creating a Custom Activity Designer 

The ActivityDesigner class in the System.Workflow.ComponentModel.Design namespace provides visual activity design functionality for creating basic activities. All the standard Windows Workflow Foundation primitive activities inherit directly from the ActivityDesigner class. These are simple activities that do not contain any child activities.

The ActivityDesigner class provides the following basic designer features:

  • Rendering support by drawing icons, description, border, interior, and background.

  • Rendering help text.

  • Default glyphs required by designers.

  • Context menu through DesignerVerbs.

  • Filtering design-time-specific properties.

  • Default event generation.

  • Default hit testing.

  • Triggering validation.

  • Tool-tip support.

  • Participation in keyboard navigation.

  • Accessibility support.

  • Toolbox support.

  • Theme support.

  • Smart tag support.

  • Message filtering support.

  • Event handling for mouse events.

Activity designers that support creating activities that have children—composite activities—must inherit from the CompositeActivityDesigner class in the System.Workflow.ComponentModel.Design namespace.

The CompositeActivityDesigner class provides the following designer features:

  • Expanding and collapsing the designers.

  • Drag-and-drop indicators.

  • Layout of self and child activities.

  • Drawing self and child activities.

  • Hit testing the child activities.

  • Inserting and removing activities from a hierarchy.

The FreeformActivityDesigner class enables you to modify how activities are visually connected to each other in your custom composite activity, while the StructuredCompositeActivityDesigner class makes you conform to a default way of visually connecting the child activities of your custom composite activity. The ParallelActivityDesigner and SequentialActivityDesigner derive from StructuredCompositeActivityDesigner, and at design time, they behave like the ParallelActivity and SequenceActivity activities in that child activities are added in a vertical manner to the activity, or horizontal and then vertical in the case of the ParallelActivityDesigner.

NoteNote

Viewing custom activity designers in the activity's design mode is not currently supported. In order to view the design of a custom activity, you must first compile it and add it to a consuming workflow.

For an example of creating a custom activity designer, see Basic Activity Designer Sample.

See Also

Footer image
Send comments about this topic to Microsoft.
Show: