All pages
Powered by GitBook
1 of 1

Loading...

ComponentToolCollection

Wisej.Web.ComponentToolCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (2.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>
Public Class ComponentToolCollection
    Inherits IList
    Implements ICollection, IEnumerable, IList(Of ComponentTool), ICollection(Of ComponentTool), IEnumerable(Of ComponentTool)

Constructors

ComponentToolCollection()

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

ComponentToolCollection(owner)

Initializes a new instance of the class.

Name
Type
Description

Properties

IsReadOnly

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

Item(index)

: Returns or sets the at the specified index.

Item(name)

: Returns the identified by the name.

Methods

Add(name, imageSource)

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

Parameter
Type
Description

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

Add(tool)

Adds a to the collection.

Parameter
Type
Description

Throws:

  • The being added to the collection was null.

  • The parent of the specified in the tool parameter is not null.

AddRange(tools)

Adds an array of to the collection

Parameter
Type
Description

Clear()

Removes all tools from the collection.

Clear(dispose)

Removes and optionally disposes all tools from the collection.

Parameter
Type
Description

Contains(tool)

Determines whether the specified panel is located within the collection.

Parameter
Type
Description

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

ContainsKey(key)

Determines whether the collection contains a with the specified key.

Parameter
Type
Description

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

GetEnumerator()

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

Returns: . An that represents the item collection.

IndexOf(tool)

Returns the index within the collection of the specified panel.

Parameter
Type
Description

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

IndexOfKey(key)

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

Parameter
Type
Description

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

Insert(index, tool)

Inserts the specified into the collection at the specified index.

Parameter
Type
Description

Throws:

  • The tool parameter is null.

  • The tool parameter's parent is not null.

  • The index parameter is less than zero or greater than the value of the property of the class.

Remove(tool)

Removes the specified from the collection.

Parameter
Type
Description

Returns: .

Throws:

  • The assigned to the tool parameter is null.

RemoveAt(index)

Removes the located at the specified index within the collection.

Parameter
Type
Description

Throws:

  • The index parameter is less than zero or greater than or equal to the value of the property of the class.

RemoveByKey(key)

Removes the with the specified key from the collection.

Parameter
Type
Description

owner

Control

The Control control that owns this collection.

name

String

The name of the ComponentTool that is being added.

imageSource

String

The image of the ComponentTool that is being added.

tool

ComponentTool

A ComponentTool that represents the panel to add to the collection.

tools

ComponentTool[]

dispose

Boolean

Indicates whether the removed items should be disposed.

tool

ComponentTool

The ComponentTool to locate in the collection.

key

String

The name of the item to find in the collection.

tool

ComponentTool

The ComponentTool to locate in the collection.

key

String

The name of the ComponentTool to find in the collection.

index

Int32

The zero-based index location where the panel is inserted.

tool

ComponentTool

A ComponentTool representing the panel to insert.

tool

ComponentTool

The ComponentTool representing the panel to remove from the collection.

index

Int32

The zero-based index of the item to remove.

key

String

The name of the ComponentTool to remove from the collection.

ComponentToolCollection
ComponentToolCollection
Boolean
ComponentTool
ComponentTool
ComponentTool
ComponentTool
ComponentTool
ComponentTool
ComponentTool
ComponentTool
ArgumentNullException
ComponentTool
ArgumentException
ComponentTool
ComponentTool
Boolean
ComponentTool
Boolean
ComponentTool
IEnumerator
IEnumerator
Int32
ComponentTool
Int32
ComponentTool
ComponentTool
ArgumentNullException
ArgumentException
ArgumentOutOfRangeException
Count
ComponentToolCollection
ComponentTool
Boolean
ArgumentNullException
ComponentTool
ComponentTool
ArgumentOutOfRangeException
Count
ComponentToolCollection
ComponentTool