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


image

An absolute or relative URL of the image file to be used for the legend's symbol.


Legend item image.
text

The legend item text.


Legend item text.

Adds a custom Legenditem object that uses an image 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 image As String, _
   ByVal text As String _
) As Integer
Visual Basic (Usage) Copy Code
Dim instance As LegendItemsCollection
Dim image As String
Dim text As String
Dim value As Integer
 
value = instance.Add(image, text)
C#  
public int Add( 
   string image,
   string text
)

Parameters

image

An absolute or relative URL of the image file to be used for the legend's symbol.


Legend item image.
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 a color for its symbol call the Add(color,string) Method.

To insert a 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.