ActivityToolboxItem Class
Provides a base class for all toolbox items associated with an activity in a workflow designer.
Assembly: System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)
All toolbox items associated with an Activity class are derived from ActivityToolboxItem. This class displays a graphical representation of an Activity class in the toolbox of a design-time environment and creates an instance of the Activity class it is associated with when a user drags it onto the design surface. The activity toolbox item typically represents an activity to create when invoked on a design-mode document.
This class inherits directly from the ToolboxItem class.
The following example shows a complete ActivityToolboxItem class for a custom activity. In this example, the CreateComponentsCore method is overridden in order to place 2 custom activities within a ParallelActivity.
<Serializable()> _ Friend Class CustomActivityToolboxItem Inherits ActivityToolboxItem Public Sub New(ByVal type As Type) MyBase.new(type) End Sub Private Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext) Deserialize(info, context) End Sub Protected Overrides Function CreateComponentsCore(ByVal designerHost As IDesignerHost) As IComponent() Dim parallel As New ParallelActivity() parallel.Activities.Add(New CustomActivity()) parallel.Activities.Add(New CustomActivity()) Return New IComponent() {parallel} End Function End Class
System.Drawing.Design.ToolboxItem
System.Workflow.ComponentModel.Design.ActivityToolboxItem
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.