While playing today with Windows Workflow Foundation I ran into something others might run into, and thought I would put it out there.
I've been playing specifically with extending in various forms the design time support for a custom activity, and playing with dynamic/synthetized properties on them. Usually this is done through a custom ActivityDesigner that manipulates the properties collection in PreFilterProperties(), and sometimes via the IDynamicPropertyTypeProvider interface (which so far I've found rather superflous).
Unfortunately, in this particular case that didn't do the trick, so I decided to go one step further and see if I could hack this by attaching a ICustomTypeDescriptor implementation to a custom activity via a custom TypeDescriptionProvider.
This didn't go too well. Several problems I've run into so far include:
- All activities from a workflow disappearing on the designer (even though they are still there)
- Ocassionally crashing Visual Studio :-)
- Weird compilation errors during validation, like this:
error 348: Compilation failed. Specified method is not supported
One of the issues at least seems to be caused by the fact that the CompositeActivity base class already has a custom type descriptor attached to it that you can't get at directly (since it's internal). I'll probably play with this some more, though from what I've seen so far it doesn't seem like it would accomplish what i was trying for even if I could work around the other issues.