Uredi

DesignerActionListCollection Class

Definition

Represents a collection of DesignerActionList objects.

public ref class DesignerActionListCollection : System::Collections::CollectionBase
public class DesignerActionListCollection : System.Collections.CollectionBase
[System.Runtime.InteropServices.ComVisible(true)]
public class DesignerActionListCollection : System.Collections.CollectionBase
type DesignerActionListCollection = class
    inherit CollectionBase
[<System.Runtime.InteropServices.ComVisible(true)>]
type DesignerActionListCollection = class
    inherit CollectionBase
Public Class DesignerActionListCollection
Inherits CollectionBase
Inheritance
DesignerActionListCollection
Attributes

Examples

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

private DesignerActionListCollection actionLists;
Private lists As DesignerActionListCollection
public override DesignerActionListCollection ActionLists
{
    get
    {
        if (null == actionLists)
        {
            actionLists = new DesignerActionListCollection();
            actionLists.Add(
                new ColorLabelActionList(this.Component));
        }
        return actionLists;
    }
}
Public Overrides ReadOnly Property ActionLists() _
As DesignerActionListCollection
    Get
        If lists Is Nothing Then
            lists = New DesignerActionListCollection()
            lists.Add( _
            New ColorLabelActionList(Me.Component))
        End If
        Return lists
    End Get
End Property

Remarks

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.

Constructors

Name Description
DesignerActionListCollection()

Initializes a new instance of the DesignerActionListCollection class with default settings.

DesignerActionListCollection(DesignerActionList[])

Initializes a new instance of the DesignerActionListCollection class with the specified panel items.

Properties

Name Description
Item[Int32]

Gets or sets the element at the specified index.

Methods

Name Description
Add(DesignerActionList)

Adds the supplied DesignerActionList to the current collection.

AddRange(DesignerActionList[])

Adds the elements of the supplied DesignerActionList array to the end of the current collection.

AddRange(DesignerActionListCollection)

Adds the elements of the supplied DesignerActionListCollection to the end of the current collection.

Contains(DesignerActionList)

Indicates whether the collection contains a specific value.

CopyTo(DesignerActionList[], Int32)

Copies the elements of the current collection into the supplied array, starting at the specified array index.

IndexOf(DesignerActionList)

Determines the index of a specific item in the collection.

Insert(Int32, DesignerActionList)

Inserts the supplied DesignerActionList into the collection at the specified position.

OnValidate(Object)

Performs additional custom processes when validating a value.

Remove(DesignerActionList)

Removes the first occurrence of a specific DesignerActionList from the collection.

Applies to

See also