Class ToolCollection
A collection of Tool objects.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Windows.dll
Syntax
public class ToolCollection : CollectionEx, IList, ICollection, IEnumerable, ICloneable, ISerializable, IServiceReferenceHolder, IServiceReferenceProvider
Remarks
Constructors
ToolCollection()
Initializes a new instance of the ToolCollection class.
Declaration
public ToolCollection()
ToolCollection(ToolCollection)
Initializes a new instance of the ToolCollection class.
Declaration
public ToolCollection(ToolCollection src)
Parameters
Type | Name | Description |
---|---|---|
ToolCollection | src | The source instance. |
Properties
Item[Int32]
Gets or sets the Tool at the specified index.
Declaration
public Tool this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the tool. |
Property Value
Type | Description |
---|---|
Tool | The tool. |
Methods
Add(Tool)
Adds the specified tool.
Declaration
public int Add(Tool tool)
Parameters
Type | Name | Description |
---|---|---|
Tool | tool | The tool. |
Returns
Type | Description |
---|---|
System.Int32 | The tool index. |
Clone()
Creates a new object that is a copy of the current instance.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of this instance. |
Overrides
Contains(Tool)
Determines whether collection contains the specified tool.
Declaration
public bool Contains(Tool tool)
Parameters
Type | Name | Description |
---|---|---|
Tool | tool | The tool. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CopyTo(Tool[], Int32)
Copies all collection member to array.
Declaration
public void CopyTo(Tool[] tools, int index)
Parameters
Type | Name | Description |
---|---|---|
Tool[] | tools | The tools. |
System.Int32 | index | The index. |
GetEnumerator()
Gets the enumerator.
Declaration
public override IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | The tool enumerator. |
Overrides
IndexOf(Tool)
Gets the specified tool index in current collection.
Declaration
public int IndexOf(Tool tool)
Parameters
Type | Name | Description |
---|---|---|
Tool | tool | The tool. |
Returns
Type | Description |
---|---|
System.Int32 | The index. |
Insert(Int32, Tool)
Inserts the specified index.
Declaration
public void Insert(int index, Tool tool)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index. |
Tool | tool | The tool. |
OnValidate(ICollection)
Validates given values.
Declaration
protected override void OnValidate(ICollection values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ICollection | values | values to validate |
Overrides
Exceptions
Type | Condition |
---|---|
System.InvalidCastException |
OnValidate(Object)
Validates given value.
Declaration
protected override void OnValidate(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | value to validate |
Overrides
Exceptions
Type | Condition |
---|---|
System.InvalidCastException |
Remove(Tool)
Removes the specified tool.
Declaration
public void Remove(Tool tool)
Parameters
Type | Name | Description |
---|---|---|
Tool | tool | The tool. |