locked
Hosted Designer: Load should be called only once during the lifetime of a workflow designer object RRS feed

  • Question

  • Hosted Workflow designer using a WPF application.
    Initially, workflowdesiger was loadeded using

    WorkflowDesigner

     

     

    workflowDesigner = new WorkflowDesigner();
    workflowDesigner.Load(new Sequence());

    Created a button called "Change to FlowChart".When user clicks the button, a method will be called which has below statement
    workflowDesigner.Load(new FlowChart());

    The error which I get is
    "Load should be called only once during the lifetime of a workflowdesigner object"

    I want to load different XAML files and  workflow objects at runtime.

    What is the appropriate way to do load different instances of XAML/objects using workflowdesigner?

    • Edited by sans_india85 Saturday, November 14, 2009 7:38 AM
    Wednesday, November 11, 2009 5:41 AM

Answers

  • With this design, instead you can create a new WorkflowDesigner() object, remove the old one from your UI, and replace it.
    Tim

    Wednesday, November 11, 2009 10:14 PM

All replies

  • With this design, instead you can create a new WorkflowDesigner() object, remove the old one from your UI, and replace it.
    Tim

    Wednesday, November 11, 2009 10:14 PM
  • Thanks a lot for the answer.Even,I had done it in the same way.I expected that there could be another way to do it.
    Thursday, November 12, 2009 6:16 AM