Skip to main content

MapEditor.SetCreateModeCommand Property

Returns the command that switches the Editor to the Create mode.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

Declaration

public ICommand SetCreateModeCommand { get; }

Property Value

Type Description
ICommand

The command that switches the Editor to the Create mode.

Remarks

This command receives a MapItemSettingsBase object as the command parameter. The object specifies the type of a new map item and provides the default item configuration.

Example

<dxm:MapControl x:Name="mapControl1">
    <dxm:MapControl.MapEditor>
        <dxm:MapEditor x:Name="editor">
            <dxm:MapEditor.EditorPanelOptions>
                <dxm:MapEditorPanelOptions Visible="False"/>
            </dxm:MapEditor.EditorPanelOptions>
        </dxm:MapEditor>
    </dxm:MapControl.MapEditor>
    ...
</dxm:MapControl>
<dx:SimpleButton Content="Add Rectangle" HorizontalAlignment="Left" 
                 Height="100" VerticalAlignment="Top" 
                 Command="{Binding ElementName=editor, Path=SetCreateModeCommand}">
    <dx:SimpleButton.CommandParameter>
        <dxm:MapRectangleSettings/>
    </dx:SimpleButton.CommandParameter>
</dx:SimpleButton>
See Also