Back to Devexpress

MapEditor.SetCreateModeCommand Property

wpf-devexpress-dot-xpf-dot-map-dot-mapeditor-48e1b3ab.md

latest2.0 KB
Original Source

MapEditor.SetCreateModeCommand Property

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

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public ICommand SetCreateModeCommand { get; }
vb
Public ReadOnly Property SetCreateModeCommand As ICommand

Property Value

TypeDescription
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

xaml
<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

MapEditor Class

MapEditor Members

DevExpress.Xpf.Map Namespace