Search code examples
wpfworkflow-foundation-4

Hiding the Arguments from a Rehosted workflow designer


I have a rehosted workflow. I'm creating a custom way users can input arguments. I want to remove the Arguments section from the WorkflowDesigner.View.

is that possible?enter image description here

Cheers

theHaggis


Solution

  • After creating your WorkflowDesigner:

    var designer = new WorkflowDesigner();
    

    You can access various options, including the one where you show/hide bar items, using DesignerView, like this:

    var designerView = designer.Context.Services.GetService<DesignerView>();
    
    designerView.WorkflowShellBarItemVisibility =
        ShellBarItemVisibility.Imports |
        ShellBarItemVisibility.MiniMap |
        ShellBarItemVisibility.Variables |
        // ShellBarItemVisibility.Arguments | <-- Uncomment to show again
        ShellBarItemVisibility.Zoom;