Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

MapEditorEditMode Class

The Map Editor‘s mode that allows end users to add, remove, and edit coordinates of a map shape’s points.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

#Declaration

public class MapEditorEditMode :
    MapEditorModeBase

#Remarks

To enable the Edit mode, click the Edit Mode Icon icon on the built-in Editor Panel. The following table represents actions available in this mode:

Action

Example

Description

Add a vertex

To add a new vertex, hover the mouse pointer between two points over the item’s edge and click.

Move a vertex

Drag an existing point to a new position to relocate it.

Delete a vertex

Double click a vertex to remove it.

The markup below translates the Editor to this mode at design time:

<dxm:MapEditor>
    <dxm:MapEditor.Mode>
        <dxm:MapEditorEditMode/>
    </dxm:MapEditor.Mode>
</dxm:MapEditor>

The code above uses the following properties:

Symbol Description
MapEditor.Mode Gets or sets the mode that the Map Editor currently uses.
MapEditorEditMode The Map Editor‘s mode that allows end users to add, remove, and edit coordinates of a map shape’s points.

Note

The current Editor’s mode can be set to Edit at runtime using the MapEditor.SetEditModeCommand command. Refer to the How to: Implement a Custom UI using the Map Editor API section to learn more about the Editor’s commands.

Important

Only MapPolyline, MapPolygon, MapPath and MapLine (only relocating the line’s existing points) are available for edit in the Edit mode.

See Also