Skip to main content

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

FixedMiniMapBehavior Class

This class provides the fixed mini map behavior.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

NuGet Package: DevExpress.Win.Map

#Declaration

public class FixedMiniMapBehavior :
    MiniMapBehavior

#Remarks

  • This class introduces the FixedMiniMapBehavior.CenterPoint property to specify a center point of the mini map and the FixedMiniMapBehavior.ZoomLevel property to set the zoom level of the mini map.
  • When a mini map operates in this mode, its center point and zoom level are fixed. The following images demonstrates fixed 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
FixedMiniMapBehavior
See Also