A newer version of this page is available. Switch to the current version.

LegendItemCreatingEventHandler Delegate

A method that will handle the MapControl.LegendItemCreating event.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v19.1.dll

Declaration

public delegate void LegendItemCreatingEventHandler(
    object sender,
    LegendItemCreatingEventArgs e
);
Public Delegate Sub LegendItemCreatingEventHandler(
    sender As Object,
    e As LegendItemCreatingEventArgs
)

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.

Examples

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