Skip to main content
All docs
V24.1

Measurements.SetCreateModeCommand Property

Returns the command that activates the Measurements object’s Create mode.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v24.1.dll

NuGet Package: DevExpress.Wpf.Map

Declaration

public ICommand SetCreateModeCommand { get; }

Property Value

Type Description
ICommand

The command that activates the Measurements object’s Create mode.

Remarks

The following markup activates Create mode for the area ruler when a user clicks the custom “Add Area Ruler” button:

<dxm:MapControl x:Name="mapControl1">
  <dxm:MapControl.Measurements>
      <dxm:Measurements x:Name="measurements">
          <dxm:Measurements.ToolbarOptions>
              <dxm:MeasurementToolbarOptions Visible="False"/>
          </dxm:Measurements.ToolbarOptions>
      </dxm:Measurements>
  </dxm:MapControl.Measurements>
  ...
</dxm:MapControl>

<dx:SimpleButton Content="Add Area Ruler"
                 Command="{Binding ElementName=measurements, Path=SetCreateModeCommand}">
  <dx:SimpleButton.CommandParameter>
    <dxm:RulerType>Area</dxm:RulerType>
  </dx:SimpleButton.CommandParameter>
</dx:SimpleButton>
See Also