Back to Devexpress

MeasurementToolbarOptions.ShowDistanceButton Property

wpf-devexpress-dot-xpf-dot-map-dot-measurementtoolbaroptions.md

latest2.6 KB
Original Source

MeasurementToolbarOptions.ShowDistanceButton Property

Specifies whether the Add Distance Ruler button is displayed in the Measurements toolbar.

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public bool ShowDistanceButton { get; set; }
vb
Public Property ShowDistanceButton As Boolean

Property Value

TypeDescription
Boolean

true, if the Add Distance Ruler button is visible; otherwise, false.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ShowDistanceButton
Measurements

.ToolbarOptions .ShowDistanceButton

| | MeasurementToolbar |

.Options .ShowDistanceButton

|

Remarks

The following examples hide the Add Distance Ruler button.

In markup:

xaml
<dxm:MapControl.Measurements>
  <dxm:Measurements BeforeMeasurement="Measurements_BeforeMeasurement">
      <dxm:Measurements.ToolbarOptions>
          <dxm:MeasurementToolbarOptions ShowDistanceButton="False"/>
      </dxm:Measurements.ToolbarOptions>
  </dxm:Measurements>
</dxm:MapControl.Measurements>

In code:

csharp
mapControl1.Measurements = new Measurements();
mapControl1.Measurements.ToolbarOptions = new MeasurementToolbarOptions();
mapControl1.Measurements.ToolbarOptions.ShowDistanceButton = false;
vb
mapControl1.Measurements = New Measurements()
mapControl1.Measurements.ToolbarOptions = New MeasurementToolbarOptions()
mapControl1.Measurements.ToolbarOptions.ShowDistanceButton = False

See Also

MeasurementToolbarOptions Class

MeasurementToolbarOptions Members

DevExpress.Xpf.Map Namespace