2 minutes to read
In this article
This section contains samples that demonstrate built-in Windows Workflow Foundation (WF) activities.
In This Section
Fault Handling in a Flowchart Activity Using TryCatch Demonstrates how the TryCatch activity can be used within a complex control flow activity.
Emulating breaking in a While activity Demonstrates how to break the looping mechanism of the following activities: DoWhile, ForEach<T>, While, and ParallelForEach<T>.
DynamicActivity Creation Demonstrates two different ways to create an activity at runtime using the DynamicActivity activity.
Using Variables with a .NET Framework 3.5 Ruleset Demonstrates how to create a workflow that uses the Interop activity to integrate a custom activity written in .NET Framework 3.5 that uses policy and rules.
Load From XAML Demonstrates how to dynamically load a XAML workflow without having to run the XamlBuildTask tool.
Using Collection Activities Demonstrates how to use the collection activities ( AddToCollection<T>, ClearCollection<T>, ExistsInCollection<T>, and RemoveFromCollection<T>) with a class that implements the ICollection interface and how to create a custom activity that iterates over a collection to print out the contents of each element in the collection.
Using the InvokeMethod Activity Demonstrates how to use the InvokeMethod activity to invoke public methods in public classes.
Using the Pick Activity Demonstrates how to use the Pick activity.
Using Procedural Activities Demonstrates how to use the Sequence, Assign, If, While, Switch<T>, TryCatch, and WriteLine activities to implement a guessing game.
Using CancellationScope Demonstrates how to use the CancellationScope activity to cancel work in an application.
InvokeMethod Demonstrates the different ways to use the InvokeMethod activity to invoke methods of a class.
Usage of the Switch Activity with Custom Types Describes how to enable a Switch<T> activity to evaluate a user-defined complex type at runtime.
Interop with 3.5 Rule Set Demonstrates the use of the Interop activity to integrate with a custom activity in .NET Framework 3.5 using PolicyActivity and rules.