Skip to main content

MapEditorCreateMode Class

The Map Editor‘s mode in which end users can add new map items.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

Declaration

public class MapEditorCreateMode :
    MapEditorModeBase

Remarks

The following built-in Editor Panel‘s icons allow you to enable the mode: Add Pushpin Icon, Add Pushpin Icon, Add Pushpin Icon, Add Pushpin Icon, Add Pushpin Icon, Add Pushpin Icon or Add Pushpin Icon.

The Editor uses mouse actions like click or drag over the Map to create a new map item:

Create Pushpin Example

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

<dxm:MapEditor>
    <dxm:MapEditor.Mode>
        <dxm:MapEditorCreateMode>
            <!-- This property specifies a new item's type and default settings. -->
            <dxm:MapEditorCreateMode.MapItemSettings>
                <dxm:MapPathSettings/>
            </dxm:MapEditorCreateMode.MapItemSettings>
        </dxm:MapEditorCreateMode>
    </dxm:MapEditor.Mode>
</dxm:MapEditor>

The code above uses the following properties and classes:

Symbol Description
MapEditor.Mode Gets or sets the mode that the Map Editor currently uses.
MapEditorCreateMode The Map Editor‘s mode in which end users can add new map items.
MapEditorCreateMode.MapItemSettings Gets or sets an object that configures map items that end users can create.
MapItemSettingsBase The base class for all map items settings classes.

Note

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

See Also