Export (0) Print
Expand All

ActivityToolboxItem Class

Note: This API is now obsolete.

Provides a base class for all toolbox items associated with an activity in a workflow designer.

System.Object
  System.Drawing.Design.ToolboxItem
    System.Workflow.ComponentModel.Design.ActivityToolboxItem

Namespace:  System.Workflow.ComponentModel.Design
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

[SerializableAttribute]
[ObsoleteAttribute("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class ActivityToolboxItem : ToolboxItem

The ActivityToolboxItem type exposes the following members.

  NameDescription
Public methodActivityToolboxItem()Initializes a new instance of the ActivityToolboxItem class.
Public methodActivityToolboxItem(Type)Initializes a new instance of the ActivityToolboxItem class that creates the specified type of Activity component.
Protected methodActivityToolboxItem(SerializationInfo, StreamingContext)Initializes a new instance of the ActivityToolboxItem class by using the specified SerializationInfo and StreamingContext.
Top

  NameDescription
Public propertyAssemblyNameGets or sets the name of the assembly that contains the type or types that the toolbox item creates. (Inherited from ToolboxItem.)
Public propertyBitmapGets or sets a bitmap to represent the toolbox item in the toolbox. (Inherited from ToolboxItem.)
Public propertyCompanyGets or sets the company name for this ToolboxItem. (Inherited from ToolboxItem.)
Public propertyComponentTypeGets the component type for this ToolboxItem. (Inherited from ToolboxItem.)
Public propertyDependentAssembliesGets or sets the AssemblyName for the toolbox item. (Inherited from ToolboxItem.)
Public propertyDescriptionGets or sets the description for this ToolboxItem. (Inherited from ToolboxItem.)
Public propertyDisplayNameGets or sets the display name for the toolbox item. (Inherited from ToolboxItem.)
Public propertyFilterGets or sets the filter that determines whether the toolbox item can be used on a destination component. (Inherited from ToolboxItem.)
Public propertyIsTransientGets a value indicating whether the toolbox item is transient. (Inherited from ToolboxItem.)
Public propertyLockedGets a value indicating whether the ToolboxItem is currently locked. (Inherited from ToolboxItem.)
Public propertyPropertiesGets a dictionary of properties. (Inherited from ToolboxItem.)
Public propertyTypeNameGets or sets the fully qualified name of the type of IComponent that the toolbox item creates when invoked. (Inherited from ToolboxItem.)
Public propertyVersionGets the version for this ToolboxItem. (Inherited from ToolboxItem.)
Top

  NameDescription
Protected methodCheckUnlockedThrows an exception if the toolbox item is currently locked. (Inherited from ToolboxItem.)
Public methodCreateComponents()Creates the components that the toolbox item is configured to create. (Inherited from ToolboxItem.)
Public methodCreateComponents(IDesignerHost)Creates the components that the toolbox item is configured to create, using the specified designer host. (Inherited from ToolboxItem.)
Public methodCreateComponents(IDesignerHost, IDictionary)Creates the components that the toolbox item is configured to create, using the specified designer host and default values. (Inherited from ToolboxItem.)
Protected methodCreateComponentsCore(IDesignerHost)Creates an Activity component or an array of Activity components when the toolbox item is invoked. (Overrides ToolboxItem.CreateComponentsCore(IDesignerHost).)
Protected methodCreateComponentsCore(IDesignerHost, IDictionary)Creates an array of components when the toolbox item is invoked. (Inherited from ToolboxItem.)
Public methodCreateComponentsWithUICreates an Activity component or an array of Activity components that generate a dialog box on the design surface when the toolbox item is invoked.
Protected methodDeserializeLoads the state of the toolbox item from the specified serialization information object. (Inherited from ToolboxItem.)
Public methodEqualsDetermines whether two ToolboxItem instances are equal. (Inherited from ToolboxItem.)
Protected methodFilterPropertyValueFilters a property value before returning it. (Inherited from ToolboxItem.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns the hash code for this instance. (Inherited from ToolboxItem.)
Public methodStatic memberGetToolboxDisplayNameGets the associated display name for the Toolbox item in the Toolbox.
Public methodStatic memberGetToolboxImageGets the associated Image that is used to represent the Toolbox item in the Toolbox.
Public methodGetType()Gets the Type of the current instance. (Inherited from Object.)
Public methodGetType(IDesignerHost)Enables access to the type associated with the toolbox item. (Inherited from ToolboxItem.)
Protected methodGetType(IDesignerHost, AssemblyName, String, Boolean)Creates an instance of the specified type, optionally using a specified designer host and assembly name. (Inherited from ToolboxItem.)
Public methodInitializeInitializes the current toolbox item with the specified type to create. (Inherited from ToolboxItem.)
Public methodLockLocks the toolbox item and prevents changes to its properties. (Inherited from ToolboxItem.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnComponentsCreatedRaises the ComponentsCreated event. (Inherited from ToolboxItem.)
Protected methodOnComponentsCreatingRaises the ComponentsCreating event. (Inherited from ToolboxItem.)
Protected methodSerializeSaves the state of the toolbox item to the specified serialization information object. (Inherited from ToolboxItem.)
Public methodToStringReturns a String that represents the current ToolboxItem. (Inherited from ToolboxItem.)
Protected methodValidatePropertyTypeValidates that an object is of a given type. (Inherited from ToolboxItem.)
Protected methodValidatePropertyValueValidates a property before it is assigned to the property dictionary. (Inherited from ToolboxItem.)
Top

  NameDescription
Public eventComponentsCreatedOccurs immediately after components are created. (Inherited from ToolboxItem.)
Public eventComponentsCreatingOccurs when components are about to be created. (Inherited from ToolboxItem.)
Top

  NameDescription
Explicit interface implemetationPrivate methodISerializable.GetObjectDataFor a description of this member, see the GetObjectData method. (Inherited from ToolboxItem.)
Top

NoteNote

This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

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]
internal sealed class CustomActivityToolboxItem : ActivityToolboxItem
{
    public CustomActivityToolboxItem(Type type)
        : base(type)
    {
    }

    private CustomActivityToolboxItem(SerializationInfo info, StreamingContext context)
    {
        Deserialize(info, context);
    }

    protected override IComponent[] CreateComponentsCore(IDesignerHost designerHost)
    {
        CompositeActivity parallel = new ParallelActivity();
        parallel.Activities.Add(new CustomActivity());
        parallel.Activities.Add(new CustomActivity());

        return new IComponent[] { parallel };
    }
}

.NET Framework

Supported in: 4, 3.5, 3.0
Obsolete (compiler warning) in 4.6
Obsolete (compiler warning) in 4.5
Obsolete (compiler warning) in 4.5.1
Obsolete (compiler warning) in 4.5.2

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft