MapEditor.MapItemEditing Event

Occurs when a user stars to edit a map item.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v20.2.dll


public event MapItemEditingEventHandler MapItemEditing

Event Data

The MapItemEditing event's data class is MapItemEditingEventArgs. The following properties provide information specific to this event:

Property Description
Action Returns the action applied to items.
AdditionalInfo Returns additional information about edited items.
Items Returns the items to be displayed on a map.
Result Gets or sets the edit action result.


The following code shows how to complete a map path creation in the Map Editor's Create mode once the number of vertices reaches 10.

<dxm:MapControl x:Name="mapControl">
        <dxm:MapEditor x:Name="mapEditor" MapItemEditing="OnMapItemEditing">
                <dxm:MapEditorPanelOptions Visible="True"/>
    <!--. . .-->
private void OnMapItemEditing(object sender, MapItemEditingEventArgs e) {
    if (((MapEditor)sender).Mode is MapEditorCreateMode ) {
        EditableItemHitInfo info = (EditableItemHitInfo)e.AdditionalInfo;
        if (info.Item is MapPath && info.Item.GetContours()[0].Points.Count + 1 > 10)
            e.Result = MapEditActionResult.Finish;
See Also