Back to Devexpress

Measurements.ToolbarOptions Property

wpf-devexpress-dot-xpf-dot-map-dot-measurements-3afde656.md

latest2.4 KB
Original Source

Measurements.ToolbarOptions Property

Returns the Measurements toolbar options.

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public MeasurementToolbarOptions ToolbarOptions { get; set; }
vb
Public Property ToolbarOptions As MeasurementToolbarOptions

Property Value

TypeDescription
MeasurementToolbarOptions

The Measurements toolbar options.

|

Remarks

You can use the ToolbarOptions property to manage the visibility of the Add Area Ruler and Add Distance Ruler buttons. To set the visibility of these buttons, specify the MeasurePanelOptions.ShowAreaButton and MeasurePanelOptions.ShowDistanceButton properties.

The markup below hides the Add Distance Ruler button:

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

The following code hides the Add Area Ruler button:

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

See Also

Measurements Class

Measurements Members

DevExpress.Xpf.Map Namespace