Using Windows Workflow Foundation WF4, I’ve got a custom activity with a System.Guid property called UniqueId.
I want the user to be able to drag my activity onto a workflow and have it automatically generate a new GUID value for UniqueId.
What’s the easiest way to assign a new, read-only GUID value to this property at design time?
The trick is to use an IActivityTemplateFactory and in the Create() build the activity with default properties as you want it. Then you add the IActivityTemplateFactory instead of the activity itself to the toolbox.