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

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:

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