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

MapEditor.SetCreateModeCommand Property

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

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v24.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