Back to Devexpress

Measurements.SetCreateModeCommand Property

wpf-devexpress-dot-xpf-dot-map-dot-measurements-9e67bf0d.md

latest1.9 KB
Original Source

Measurements.SetCreateModeCommand Property

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

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

Measurements Class

Measurements Members

DevExpress.Xpf.Map Namespace