Share via


LegendItemsCollection.Insert 方法

定义

将自定义 LegendItem 对象插入到集合中的给定位置。

重载

Insert(Int32, Color, String)

将具有指定文本和符号颜色的 LegendItem 对象插入集合中的指定位置。

Insert(Int32, String, String)

将具有指定文本和符号图像的 LegendItem 对象插入到集合中的指定位置。

Insert(Int32, Color, String)

将具有指定文本和符号颜色的 LegendItem 对象插入集合中的指定位置。

public:
 void Insert(int index, System::Drawing::Color color, System::String ^ text);
public void Insert (int index, System.Drawing.Color color, string text);
override this.Insert : int * System.Drawing.Color * string -> unit
Public Sub Insert (index As Integer, color As Color, text As String)

参数

index
Int32

从零开始的索引中要插入 LegendItem 对象的位置。

color
Color

图例项的符号颜色。

text
String

图例项文本。

注解

使用指定的文本和符号颜色将自定义图例项插入到集合中的指定位置。

若要插入使用图像作为符号的图例项,请使用 Insert 方法。

Add如果集合为LegendItem集合,则使用 方法将使用颜色作为其符号的对象追加到末尾。

适用于

Insert(Int32, String, String)

将具有指定文本和符号图像的 LegendItem 对象插入到集合中的指定位置。

public:
 void Insert(int index, System::String ^ image, System::String ^ text);
public void Insert (int index, string image, string text);
override this.Insert : int * string * string -> unit
Public Sub Insert (index As Integer, image As String, text As String)

参数

index
Int32

从零开始的索引中要插入 LegendItem 对象的位置。

image
String

要用于图例项符号的图像文件的绝对或相对 URL。

text
String

图例项文本。

注解

使用符号的指定文本和图像将自定义图例项插入到集合中的指定位置。

若要插入使用颜色作为符号的图例项,请使用 Insert 方法。

如果集合为 LegendItemAdd则使用 方法将带有符号图像的对象追加到末尾。

适用于