Base Designer with additional adornments II

Couple of customers reported an issue with applying additional adornments on the designer discussed in this post. The issue was for out of box activities which didn't have a custom designer(were using the ActivityDesigner) itself, the adornments were not working. An example would be the Delay activity.

Currently, we don't have a clean solution to this as the ActivityDesigner has an implicit style which is picked up by WPF. And if there is such an implicit style, the App.Resources style in our application never gets picked up.

The workaround that we have suggested is to create a simple DerivedDesigner from ActivityDesigner and then apply it on for all types that are using just the ActivityDesigner. This has to be done after loading the Workflow though rather than in the RegisterMetadata section.

 AttributeTableBuilder table = new AttributeTableBuilder();
table.AddCustomAttributes(typeof(Activity), new DesignerAttribute(typeof(DerviedDesigner)));

Hope this helps!