DynamicMiniMapBehavior Class
This class provides the dynamic mini map behavior.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v24.1.dll
NuGet Package: DevExpress.Win.Map
Declaration
Remarks
- This class introduces the DynamicMiniMapBehavior.ZoomOffset property to specify an offset of the mini map, and DynamicMiniMapBehavior.MinZoomLevel and DynamicMiniMapBehavior.MaxZoomLevel to specify the minimum and maximum zoom levels which can be used by the mini map.
When a mini map operates in this mode, a mini map’s zoom level and center point change according to the zoom level and center point of the owner map. The following images demonstrates dynamic behavior mode.
Example
This example shows how to customize mini map behavior.
To do this, assign the MiniMapBehavior class descendant object to the MiniMap.Behavior property and specify the object’s properties.
List<MiniMapBehavior> behaviors = new List<MiniMapBehavior> {
new FixedMiniMapBehavior(),
new DynamicMiniMapBehavior()
};
private void Form1_Load(object sender, EventArgs e) {
cbAlignment.DataSource = Enum.GetValues(typeof(MiniMapAlignment));
cbBehavior.DataSource = behaviors;
}
private void cbBehavior_SelectedIndexChanged(object sender, EventArgs e) {
MiniMapBehavior behavior = cbBehavior.SelectedValue as MiniMapBehavior;
if (behavior == null) return;
propertyGrid.SelectedObject = behavior;
if (mapControl.MiniMap == null) return;
mapControl.MiniMap.Behavior = behavior;
}
Inheritance
Object
MiniMapBehavior
DynamicMiniMapBehavior
See Also