workflow-foundation-4rehosting

How to lock a hosted WorkflowDesigner from editing?


Is it possible to add a locked WorkflowDesigner View to a WPF application? By locked I mean no change or editing whatsoever can be done to the Workflow Model.


Solution

  • Yes by changing the ReadOnlyState

    var readOnlyState = _workflowDesigner.Context.Items.GetValue<ReadOnlyState>();
    readOnlyState.IsReadOnly = true;