How to: Add comments to a workflow in the Workflow Designer
To facilitate creating larger, more complicated workflows, .NET Framework 4.5 allows the developer to add annotations to the following types of item in the designer:
|The contents of an annotation are saved as plain text to the XAML file associated with the workflow, and could potentially be read by others. Be cautious when entering sensitive information into an annotation.|
Adding an annotation to an activity in the designer
In the workflow designer, right-click on an item in the workflow designer and select Annotations, Add Annotation.
Add the text of the annotation in the space provided.
The item will show an annotation icon. Hovering over the annotation icon will display the text of the annotation.
Displaying an annotation in an activity's designer
With an activity designer which has an annotation displaying outside the activity, click the Pin icon in the annotation adorner.
The annotation will be displayed in the activity's designer. In the screenshot below, the annotation "Starting activity in the workflow" is displayed in the activity's designer.
To display the annotation outside the activity’s designer, hover over the annotation area in the activity’s designer and click the Unpin icon
Showing or hiding all annotations
Right-click an activity that has an annotation. Select Annotations, Show All Annotations.
All the annotations will be displayed in the activity's designers.
To display all annotations outside the activity's designers, right-click on the activity and select Annotations, Hide All Annotations.
Editing or deleting an annotation for an activity
Right-click on an activity that has an annotation.
Select Annotations, Edit Annotation or Delete Annotation.
The annotation will be opened for editing or deleted.
To delete all the annotations at once, right-click the workflow designer and select Annotation, Delete All Annotations.
Adding, editing, and deleting an annotation for a variable or argument
Right-click on a variable or argument and select Add Annotation.
Enter the text of the annotation. The variable or argument will display an annotation icon.
Right-click on a variable or argument that has an annotation. Select Edit Annotation.
The annotation will be opened for editing.
Right-click on a variable or argument that has an annotation. Select Delete Annotation.
The annotation will be deleted.