How to: Add comments to a workflow in the Workflow Designer
Applies to: Visual Studio Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
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:
Important
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 shows an annotation icon. Hovering over the annotation icon displays 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 is 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 are 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 is 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 displays an annotation icon.
Right-click on a variable or argument that has an annotation. Select Edit Annotation.
The annotation is opened for editing.
Right-click on a variable or argument that has an annotation. Select Delete Annotation.
The annotation is deleted.