
Microsoft Windows Workflow Foundation 4.0 Cookbook
By :

In this task, we will use the ClearCollection<T>
activity to clear the content of a collection object.
We need to make sure we have finished the task of Printing collection items for us to be able to use the CollectionPrinter
activity in this task.
Create a Workflow Console Application:
Create a new Workflow Console Application and name it UsingClearCollectionActivity
.
Create a visual workflow:
Perform the following steps in order to create a visual workflow:
Open Workflow1.xaml
, which is the workflow created by default. Click the Imports button and type in System.Collections.ObjectModel
to import the System.Collections.ObjectModel
namespace to this workflow.
Drag a Sequence activity to the workflow designer and then drag a CollectionPrinter
activity to the designer panel two times to add two CollectionPrinter<String>
activities to the designer panel. Next, drag a ClearCollection
activity between the two CollectionPinter...
Change the font size
Change margin width
Change background colour