This documentation is archived and is not being maintained.

LegendCellCollection::Add Method (LegendCellType, String, ContentAlignment)

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

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: