I’m trying to rehost the designer, but every time I slap a workflow into the designer:
_workflowDesigner = new WorkflowDesigner();
// added to UI here
Properties.Content = _workflowDesigner.PropertyInspectorView;
_workflowDesigner.Load(myWorkflowInstance);
where myWorkflowInstance is a workflow defined in a referenced assembly. I have done the magic Register to get the default activity metadata registered:
new DesignerMetadata().Register();
and I’ve registered all my custom NativeActivities:
public static void Register(IEnumerable<Type> activityTypes)
{
// activityTypes are all my custom NativeActivities
// and all workflows (root of System.Activities.Activity)
var builder = new AttributeTableBuilder();
var attrGroups =
from x in activityTypes
from y in x.GetCustomAttributes(true).OfType<Attribute>()
group y by x into g
select g;
foreach (var typeGroup in attrGroups)
builder.AddCustomAttributes(typeGroup.Key, typeGroup.ToArray());
MetadataStore.AddAttributeTable(builder.CreateTable());
}
yet, when I load an activity in the designer this is what I get:

What am I missing here?
I’m thinking it has something to do with the fact that these workflows are compiled and only exist within the Implementation property of an Activity…
Is your workflow instance wrapped in an ActivityBuilder?
Update:
Investigating a little further here I found one possible solution using the WorkflowInspectionServices.