LegendCellCollection.Add Method (LegendCellType, String, ContentAlignment)

.NET Framework (current version)
 

Adds a legend cell with the specified cell type, text and alignment to the end of the collection.

Namespace:   System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

public int Add(
	LegendCellType cellType,
	string text,
	ContentAlignment alignment
)

Parameters

cellType
Type: System.Web.UI.DataVisualization.Charting.LegendCellType

A LegendCellType value representing the cell type.

text
Type: System.String

A string value that represents either the cell text or its image name, depending on the value of the cellType parameter.

alignment
Type: System.Drawing.ContentAlignment

A ContentAlignment value that represents the cell content alignment.

Return Value

Type: System.Int32

An integer value that represents the index of the newly added legend cell in the collection. The index is zero-based.

.NET Framework
Available since 4.0
Return to top
Show: