Skip to main content
Version: 3.5

ComponentToolCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Represents a set of tool widgets associated with a component. The component includes the tools panel according to its design. For example, the Form component includes the tools in its caption bar. Other components may include the tools elsewhere.

public class ComponentToolCollection : IList, ICollection, IEnumerable, IList<ComponentTool>, ICollection<ComponentTool>, IEnumerable<ComponentTool>

Constructors

Instance memberComponentToolCollection()

Initializes a new instance of the ComponentToolCollection class not bound to any control.

Instance memberComponentToolCollection(owner)

Initializes a new instance of the ComponentToolCollection class.

NameTypeDescription
ownerControlThe Control control that owns this collection.

Properties

Instance memberIsReadOnly

Boolean: Returns a value indicating whether this collection is read-only.

Instance memberItem(index)

ComponentTool: Returns or sets the ComponentTool at the specified index.

Instance memberItem(name)

ComponentTool: Returns the ComponentTool identified by the name.

Methods

Instance memberAdd(name, imageSource)

Adds a ComponentTool with the specified name and image source to the collection.

ParameterTypeDescription
nameStringThe name of the ComponentTool that is being added.
imageSourceStringThe image of the ComponentTool that is being added.

Returns: ComponentTool. A ComponentTool that represents the panel that was added to the collection.

Instance memberAdd(tool)

Adds a ComponentTool to the collection.

ParameterTypeDescription
toolComponentToolA ComponentTool that represents the panel to add to the collection.

Throws:

Instance memberAddRange(tools)

Adds an array of ComponentTool to the collection

ParameterTypeDescription
toolsComponentTool[]

Instance memberClear()

Removes all tools from the collection.

Instance memberClear(dispose)

Removes and optionally disposes all tools from the collection.

ParameterTypeDescription
disposeBooleanIndicates whether the removed items should be disposed.

Instance memberContains(tool)

Determines whether the specified panel is located within the collection.

ParameterTypeDescription
toolComponentToolThe ComponentTool to locate in the collection.

Returns: Boolean. true if the panel is located within the collection; otherwise, false.

Instance memberContainsKey(key)

Determines whether the collection contains a ComponentTool with the specified key.

ParameterTypeDescription
keyStringThe name of the item to find in the collection.

Returns: Boolean. true to indicate the collection contains a ComponentTool with the specified key; otherwise, false.

Instance memberGetEnumerator()

Returns an enumerator to use to iterate through the item collection.

Returns: IEnumerator. An IEnumerator that represents the item collection.

Instance memberIndexOf(tool)

Returns the index within the collection of the specified panel.

ParameterTypeDescription
toolComponentToolThe ComponentTool to locate in the collection.

Returns: Int32. The zero-based index where the panel is located within the collection; otherwise, negative one (-1).

Instance memberIndexOfKey(key)

Returns the index of the first occurrence of a ComponentTool with the specified key.

ParameterTypeDescription
keyStringThe name of the ComponentTool to find in the collection.

Returns: Int32. The zero-based index of the first occurrence of the ComponentTool with the specified key, if found; otherwise, -1.

Instance memberInsert(index, tool)

Inserts the specified ComponentTool into the collection at the specified index.

ParameterTypeDescription
indexInt32The zero-based index location where the panel is inserted.
toolComponentToolA ComponentTool representing the panel to insert.

Throws:

Instance memberRemove(tool)

Removes the specified ComponentTool from the collection.

ParameterTypeDescription
toolComponentToolThe ComponentTool representing the panel to remove from the collection.

Returns: Boolean.

Throws:

Instance memberRemoveAt(index)

Removes the ComponentTool located at the specified index within the collection.

ParameterTypeDescription
indexInt32The zero-based index of the item to remove.

Throws:

Instance memberRemoveByKey(key)

Removes the ComponentTool with the specified key from the collection.

ParameterTypeDescription
keyStringThe name of the ComponentTool to remove from the collection.