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...
- Open the workflow designer project:
Open the workflow designer project we created in the previous task.
- Add code to the designer:
Open the designer's backend CS code file,
MainWindow.xaml.cs
, and create a new methodGetActivity
. Then add code to theTabItem_GotFocus_RefreshXamlBox
method and theMenuItem_Click_RunWorkflow
method:Activity GetActivity() { wd.Flush(); System.IO.StringReaderstringReader = new System. IO.StringReader(wd.Text); Activity ...
Get Microsoft Windows Workflow Foundation 4.0 Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.