Export (0) Print
Expand All

DesignerActionListCollection Class

Represents a collection of DesignerActionList objects.

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

[ComVisibleAttribute(true)]
[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class DesignerActionListCollection : CollectionBase

The DesignerActionListCollection class represents the aggregation of all the items in a smart tag panel. The DesignerActionListCollection class contains zero or more DesignerActionList objects. Each of these lists contains zero or more objects that represent the actual items in the panel and are derived from the DesignerActionItem class.

The following table shows the two techniques for supplying a DesignerActionListCollection to populate the panel with items for components, including custom controls.

Technique

Description

Pull model

The designer for the component class, which is derived from the ComponentDesigner class, supplies this collection through the ActionLists property. The designer infrastructure reads this property when it must display the panel.

Push model

A DesignerActionList or DesignerActionListCollection is supplied as a parameter in a call to the Add method of the DesignerActionService associated with the component.

The designer infrastructure constructs a panel by creating a smart tag panel, whose constructor takes two parameters of type DesignerActionListCollection. The collections of lists, which contain the pulled and pushed items, are merged into one panel.

Because it derives from the System.Collections.CollectionBase class, DesignerActionListCollection uses an internal ArrayList to store its collection of DesignerActionList objects.

The following code example demonstrates how to create a collection of DesignerActionItem objects.

For a full example, see How to: Attach Smart Tags to a Windows Forms Component.

private DesignerActionListCollection actionLists;
public override DesignerActionListCollection ActionLists
{
    get
    {
        if (null == actionLists)
        {
            actionLists = new DesignerActionListCollection();
            actionLists.Add(
                new ColorLabelActionList(this.Component));
        }
        return actionLists;
    }
}

System.Object
  System.Collections.CollectionBase
    System.ComponentModel.Design.DesignerActionListCollection

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

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft