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

Hosting workflow in a Windows Form

In this task we will create a workflow running in a Windows Form application.

How to do it...

  1. Create a Windows Form project:

    Create a Windows Form project and name it HostingWorkflowInWinForm.

  2. Create a workflow:

    Add a workflow to the project and call it AdditionWorkflow.xaml. Author the workflow like this:

    How to do it...
  3. Create a Windows Form.

    Open the default created Form1.cs file and alter it to:

    How to do it...

    Double-click the Adding button and add code to the button event handler. The final code will be:

    using System;using System.Windows.Forms;using ...

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