Making an activity’s display name readonly in the Workflow 4 designer

To make an activity’s display name readonly, it isn’t enough to use the ReadOnlyAttribute on the DisplayName. In order to do this, create a custom PropertyValueEditor that displays a string in a text block, then declare an editor attribute on the “DisplayName” property of your activity. The following code demonstrates how to create a read-only…


Constraining what activities can be dropped on a custom activity designer in Workflow 4

When designing a custom activity that can be used as a container for other activities, you may want to restrict the activity user to a certain set of activities. If the custom activity can only accept a single type, this can be implemented quite simply by setting the WorkflowItemPresenter.AllowedItemType or WorkflowItemsPresenter.AllowedItemType property. Here is an…