Back to Devexpress

MapControl.MapEditor Property

wpf-devexpress-dot-xpf-dot-map-dot-mapcontrol-2e98df5d.md

latest3.0 KB
Original Source

MapControl.MapEditor Property

Gets or sets the Map Control’s Vector Item Editor.

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public MapEditor MapEditor { get; set; }
vb
Public Property MapEditor As MapEditor

Property Value

TypeDescription
MapEditor

The Map Control’s Vector Item Editor.

|

Remarks

The Map Editor allows users to add, remove, and modify vector items.

The Map Control displays the Editor Panel when the Editor is assigned to the Map Control. The MapEditor.EditorPanelOptions property manages the content that the panel displays:

The Map Editor supports four modes that allow the Editor to apply different changes. The MapEditor.Mode property specifies the current editor mode.

The following code enables the Editor, specifies its default mode, and changes the Editor Panel’s location:

<dxm:MapControl>
    <dxm:MapControl.MapEditor>
        <dxm:MapEditor ActiveLayer="{Binding ElementName=vectorLayer}"
                       ActiveItems="{Binding ItemsOnEdit}">
            <dxm:MapEditor.Mode>
                <dxm:MapEditorEditMode/>
            </dxm:MapEditor.Mode>
            <dxm:MapEditor.EditorPanelOptions>
                <dxm:MapEditorPanelOptions VerticalAlignment="Bottom" Margin="8"/>
            </dxm:MapEditor.EditorPanelOptions>
        </dxm:MapEditor>
    </dxm:MapControl.MapEditor>
    <!-- Other Map Control settings -->
</dxm:MapControl>

If you want to customize the editor, for example, extend its functionality or hide any of existing buttons, you can implement a custom editor. For more information, refer to the following section: How to: Implement a Custom UI Using the Map Editor API.

See Also

Vector Item Editor

MapControl Class

MapControl Members

DevExpress.Xpf.Map Namespace