Skip to main content
A newer version of this page is available. .

LegendItemCreatingEventHandler Delegate

A method that will handle the MapControl.LegendItemCreating event.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v18.2.dll

Declaration

public delegate void LegendItemCreatingEventHandler(
    object sender,
    LegendItemCreatingEventArgs e
);

Parameters

Name Type Description
sender Object

The event source.

e LegendItemCreatingEventArgs

A LegendItemCreatingEventArgs object that contains event data.

Remarks

When creating a LegendItemCreatingEventHandler delegate, you identify the method that will handle the corresponding event. To associate an event with your event handler, add a delegate instance to this event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event handler delegates, see Events and Delegates in MSDN.

Example

To manually customize legend items, implement the MapControl.LegendItemCreating event handler, where you can configure MapLegendItemBase descendant class objects as you wish.

The following instance demonstrates how to do this.

void map_LegendItemCreating(object sender, LegendItemCreatingEventArgs e) {
    e.Item.Text = String.Format("{0}$", e.Item.Value);
}
See Also