Share via


LegendCellCollection.Add(LegendCellType, String, ContentAlignment) 方法

定義

將具有指定的資料格類型、文字與對齊方式之圖例資料格加入到此集合的結尾。

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

參數

cellType
LegendCellType

表示資料格類型的 LegendCellType 值。

text
String

表示資料格文字或其影像名稱的 string 值 (視 cellType 參數的值而定)。

alignment
ContentAlignment

表示資料格內容對齊方式的 ContentAlignment 值。

傳回

Int32

integer 值,表示集合中新加入之圖例資料格的索引。 索引以零為起始。

適用於