.netwpfselectionworkflow-foundation-4rehosting

How to get the selected activity in rehosted WorkflowDesigner


How do I get (programatically) the current selection? As an Activity instance, if possible?


Solution

  • Activity activity = workflowDesigner.Context.Items.GetValue<Selection>().
        PrimarySelection.GetCurrentValue() as Activity;