All docs
V21.2
21.2
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

MapControl.ScrollArea Property

Gets or sets a rectangular area (also called scroll area) that confines the map center point.

Namespace: DevExpress.Xpf.Map

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

Declaration

public MapBounds ScrollArea { get; set; }

Property Value

Type Description
MapBounds

The scroll area boundaries.

Remarks

Use this property to limit scroll operations so that the map center point remains within the boundaries. To define these boundaries, specify the coordinates of the area’s top-left and bottom-right corners.

In the following animation, a rectangle depicts the scroll area boundaries and a dot indicates the map center position:

Limited scroll area

Example

This example specifies a rectangular area that confines the map center point:

In Code

<dxm:MapControl x:Name="map">
   ...
</dxm:MapControl>   
using DevExpress.Xpf.Map;
//...
  private void Window_Loaded(object sender, RoutedEventArgs e) {
      map.ScrollArea = new DevExpress.Map.MapBounds(
                              new GeoPoint(44.568441, -11.877712),
                              new GeoPoint(36.219329, 4.030490));
      map.CenterPoint = new GeoPoint(40.155242, -2.912869);
      map.ZoomLevel = 4.5;
  }

In Markup

You can also specify the scroll area in markup. Coordinates are written in the following order: x1, y1, x2, y2, where x1, y1 are the top-left point’s coordinates, and x2, y2 are the bottom-right point’s coordinates.

<dxm:MapControl x:Name="map"
                ScrollArea="-11.877712, 44.568441, 4.030490, 36.219329"
                CenterPoint="40.155242, -2.912869" 
                ZoomLevel="4.5">
    ...
</dxm:MapControl>    
See Also