Dundas Chart for Windows Forms
Add(Color,String) Method
See Also  Send comments on this topic.
DundasWinChart Assembly > Dundas.Charting.WinControl Namespace > LegendItemsCollection Class > Add Method : Add(Color,String) Method


color

The symbol color of the legend item.


Legend item color.
text

The legend item text.


Legend item text.

Adds a custom Legenditem object that uses a color for its symbol to the end of the collection.


Adds one legend item into the collection.

Syntax

Visual Basic (Declaration)  
Public Overloads Function Add( _
   ByVal color As Color, _
   ByVal text As String _
) As Integer
Visual Basic (Usage) Copy Code
Dim instance As LegendItemsCollection
Dim color As Color
Dim text As String
Dim value As Integer
 
value = instance.Add(color, text)
C#  
public int Add( 
   Color color,
   string text
)

Parameters

color

The symbol color of the legend item.


Legend item color.
text

The legend item text.


Legend item text.

Return Value

An integer that represents the index where the item was inserted into the collection (0-based).


Index of newly added item.

Remarks

Appends a custom legend item to the collection with the specified text and symbol color.

To add a custom legend item that uses an image for its symbol call the Add(string,string) Method.

To insert a custom LegendItem object into the collection use one of the Insert methods.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2009 All Rights Reserved.