Skip to main content
All docs
V24.2

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

Measurements.SetCreateModeCommand Property

Returns the command that activates the Measurements object’s 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 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