CustomizeLegendEventArgs 类

定义

CustomizeLegend 控件的 Chart 事件提供数据。Provides data for the CustomizeLegend event of the Chart control.

public ref class CustomizeLegendEventArgs : EventArgs
public class CustomizeLegendEventArgs : EventArgs
type CustomizeLegendEventArgs = class
    inherit EventArgs
Public Class CustomizeLegendEventArgs
Inherits EventArgs
继承
CustomizeLegendEventArgs

注解

CustomizeLegendEventArgsCustomizeLegend在事件中使用。The CustomizeLegendEventArgs class is used in the CustomizeLegend event.

此类中只有两个属性。There are only two properties in this class. LegendItems属性允许您删除或修改默认图例项和自定义图例项, 并添加自定义图例项。The LegendItems property allows you to delete or modify both default and custom legend items, and to add custom legend items. 此属性还可用于更改图例项的顺序。This property can also be used to change the order of legend items.

LegendName属性用于标识引发此事件的图例。The LegendName property is used to identify the legend that raised this event.

构造函数

CustomizeLegendEventArgs(LegendItemsCollection)

用指定的 CustomizeLegendEventArgs 初始化 LegendItemsCollection 类的新实例。Initializes a new instance of the CustomizeLegendEventArgs class with the specified LegendItemsCollection.

CustomizeLegendEventArgs(LegendItemsCollection, String)

使用指定的 CustomizeLegendEventArgs 和图例名称初始化 LegendItemsCollection 类的新实例。Initializes a new instance of the CustomizeLegendEventArgs class with the specified LegendItemsCollection and legend name.

属性

LegendItems

用于移除或修改 CustomizeLegend 事件中的自定义图例项和默认图例项或者更改这些项的顺序。Used to remove, modify or change the order of both custom and default legend items in the CustomizeLegend event. 也可用于添加自定义图例项。Can also be used to add custom legend items.

LegendName

获取 Legend 对象的名称,该名称可用于确定哪个图例是 CustomizeLegend 事件的发送者。Gets the name of the Legend object, which can be used to determine which legend was the sender of the CustomizeLegend event.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于