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.RemoveRulersCommand Property

Returns a command that removes all rulers from the map.

Namespace: DevExpress.Xpf.Map

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

NuGet Package: DevExpress.Wpf.Map

#Declaration

public ICommand RemoveRulersCommand { get; }

#Property Value

Type Description
ICommand

A command that removes all rulers from the map.

#Remarks

A Map Control should contain at least one ruler that enables a button associated with the RemoveRulersCommand.

The following markup removes all rulers from the map when a user clicks the Remove Rulers button:

<dxm:MapControl x:Name="mapControl1">
   <dxm:MapControl.Measurements>
       <dxm:Measurements x:Name="measurements">
       </dxm:Measurements>
   </dxm:MapControl.Measurements>
   <!--...-->  
</dxm:MapControl>

<dx:SimpleButton Content="Remove Rulers" HorizontalAlignment="Center" VerticalAlignment="Bottom"
                 Command="{Binding ElementName=measurements, Path=RemoveRulersCommand}">
</dx:SimpleButton>
See Also