O'Reilly logo

Microsoft Windows Workflow Foundation 4.0 Cookbook by Andrew Zhu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing XAML Workflow Tab and Run events

In this task, our workflow designer will have the ability to run workflow so that we can test our workflow when we are editing.

Getting ready

Before we begin this task, we must have completed the previous task: Implementing Save and Save As events.

How to do it...

  1. Open the workflow designer project:

    Open the workflow designer project we created in the previous task.

  2. Add code to the designer:

    Open the designer's backend CS code file, MainWindow.xaml.cs, and create a new method GetActivity. Then add code to the TabItem_GotFocus_RefreshXamlBox method and the MenuItem_Click_RunWorkflow method:

    Activity GetActivity() { wd.Flush(); System.IO.StringReaderstringReader = new System. IO.StringReader(wd.Text); Activity ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required