Share via


LegendCellCollection.Insert 方法

定义

将具有指定单元类型、文本和对齐方式的图例单元插入到集合中的给定位置。

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

参数

index
Int32

要插入对象的位置的索引。

cellType
LegendCellType

一个 LegendCellType 值,该值表示单元类型。

text
String

一个 string 值,该值表示单元格文本或其图像名称,具体取决于 cellType 参数的值。

alignment
ContentAlignment

一个 ContentAlignment 枚举值,表示图例单元内容的对齐方式。

适用于