語言

LegendItemsCollection.Insert 方法

定義

在指定位置插入自訂 LegendItem 物件到集合中。

多載

名稱 Description
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

用於圖例項目符號的影像檔案的絕對或相對網址。

text
String

圖例道具文字。

備註

在指定位置使用指定的文字與圖片,將自訂的圖例項目插入集合中。

若要插入使用顏色作為符號的圖例項目,請使用以下 Insert 方法。

使用 Add 這個方法,將 LegendItem 帶有符號影像的物件附加到集合的末尾。

適用於