Språk

LegendCellCollection.Add(LegendCellType, String, ContentAlignment) Metod

Definition

Lägger till en förklaringscell med den angivna celltypen, text och justering till slutet av samlingen.

public:
 int Add(System::Windows::Forms::DataVisualization::Charting::LegendCellType cellType, System::String ^ text, System::Drawing::ContentAlignment alignment);
public int Add(System.Windows.Forms.DataVisualization.Charting.LegendCellType cellType, string text, System.Drawing.ContentAlignment alignment);
override this.Add : System.Windows.Forms.DataVisualization.Charting.LegendCellType * string * System.Drawing.ContentAlignment -> int
Public Function Add (cellType As LegendCellType, text As String, alignment As ContentAlignment) As Integer

Parametrar

cellType
LegendCellType

Ett LegendCellType värde som representerar celltypen.

text
String

Ett string värde som representerar antingen celltexten eller dess bildnamn, beroende på parameterns cellType värde.

alignment
ContentAlignment

Ett ContentAlignment värde som representerar cellens innehållsjustering.

Returer

Ett integer värde som representerar indexet för den nyligen tillagda förklaringscellen i samlingen. Indexet är nollbaserat.

Gäller för