How to get a "base" custom activity clas NOT to appear in the WF toolbox
-
I have a set of WF custom activities that inherit core behaviors from from a base activity class. So the hierarchy is: SomeCustomActivity : MyActivityBase : Activity I would like SomeCustomActivity to appear in the VS 2008 WF toolbox (it does) but NOT MyActivityBase (it does, no matter what I try). Seems like this should be doable fairly easily, after all Activity itself never appears in the toolbox. AJ
-
I have a set of WF custom activities that inherit core behaviors from from a base activity class. So the hierarchy is: SomeCustomActivity : MyActivityBase : Activity I would like SomeCustomActivity to appear in the VS 2008 WF toolbox (it does) but NOT MyActivityBase (it does, no matter what I try). Seems like this should be doable fairly easily, after all Activity itself never appears in the toolbox. AJ
-
Decorate your base activity class with the
ToolboxItem
attribute thus:[ToolboxItem(false)]
Many thanks for your response, Aviad. Your suggestion turns out to be half the solution. In addition to decorating the base class as you suggest, you must follow that with decorating any derived classes with: [ToolboxItemAttribute(typeof(ActivityToolboxItem))] If you don't do this, the derived classes inherit the [ToolboxItem(false)] from the base class. (I can't take credit for this; the whole solution was suggested to me in another forum.)