Class ChartLegendItemsCollection
A collection of ChartLegendItems.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Chart
Assembly: Syncfusion.Chart.Base.dll
Syntax
public class ChartLegendItemsCollection : ChartBaseList, IList, ICollection, IEnumerable
Constructors
ChartLegendItemsCollection()
Initializes a new instance of the ChartLegendItemsCollection class.
Declaration
public ChartLegendItemsCollection()
Properties
Item[Int32]
Looks up the collection and returns the legend item stored in the specified index.
Declaration
public ChartLegendItem this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type |
---|
ChartLegendItem |
Methods
Add(ChartLegendItem)
Adds the specified legend item to the collection.
Declaration
public int Add(ChartLegendItem value)
Parameters
Type | Name | Description |
---|---|---|
ChartLegendItem | value | The item to add. |
Returns
Type | Description |
---|---|
System.Int32 | The position into which the new element was inserted. |
AddRange(ChartLegendItem[])
Adds item array to the collection.
Declaration
public void AddRange(ChartLegendItem[] range)
Parameters
Type | Name | Description |
---|---|---|
ChartLegendItem[] | range | The array of items to add. |
Contains(ChartLegendItem)
Indicates whether the specified item is in the list.
Declaration
public bool Contains(ChartLegendItem value)
Parameters
Type | Name | Description |
---|---|---|
ChartLegendItem | value | The System.Object to locate in the System.Collections.IList. |
Returns
Type | Description |
---|---|
System.Boolean | true if the ChartLegendItem is found in the List; otherwise, false. |
IndexOf(ChartLegendItem)
Returns the index value of the specified legend item.
Declaration
public int IndexOf(ChartLegendItem value)
Parameters
Type | Name | Description |
---|---|---|
ChartLegendItem | value | The legend item to look for. |
Returns
Type | Description |
---|---|
System.Int32 | The index of value if found in the list; otherwise, -1. |
Insert(Int32, ChartLegendItem)
Inserts the specified legend item in the specified index.
Declaration
public void Insert(int index, ChartLegendItem value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index value where the legend item is to be inserted. |
ChartLegendItem | value | The legend item that is to be inserted. |
Remove(ChartLegendItem)
Removes the specified legend item from the collection.
Declaration
public void Remove(ChartLegendItem value)
Parameters
Type | Name | Description |
---|---|---|
ChartLegendItem | value | The legend item to be removed. |
ToArray()
Copies the elements of the array.
Declaration
public ChartLegendItem[] ToArray()
Returns
Type | Description |
---|---|
ChartLegendItem[] | Returns array of ChartLegendItem. |