CustomizeLegendEventArgs.LegendItems 屬性

定義

用來移除、修改或變更 CustomizeLegend 事件中自訂和預設圖例項目的順序。 也可以用來加入自訂圖例項目。

public:
 property System::Windows::Forms::DataVisualization::Charting::LegendItemsCollection ^ LegendItems { System::Windows::Forms::DataVisualization::Charting::LegendItemsCollection ^ get(); };
public System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection LegendItems { get; }
member this.LegendItems : System.Windows.Forms.DataVisualization.Charting.LegendItemsCollection
Public ReadOnly Property LegendItems As LegendItemsCollection

屬性值

LegendItemsCollection 物件。

備註

屬性 LegendItems 可讓您刪除或修改事件中的 CustomizeLegend 預設和自訂圖例專案,以及新增自訂圖例專案。 圖例專案的順序也可以變更。

注意

SeriesPointIndexSeriesName 屬性可用來判斷與預設圖例專案相關聯的資料元素。 這些屬性會傳回自訂圖例專案的長度為零的字串,因為自訂專案與圖表資料沒有關聯。

這個屬性可讓您判斷引發的事件 Legend ,這可讓您自訂個別 Legend

適用於