MiniMap.Alignment Property
Gets or sets the alignment of a mini map.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v24.1.dll
NuGet Package: DevExpress.Win.Map
Declaration
[DefaultValue(MiniMapAlignment.BottomLeft)]
public MiniMapAlignment Alignment { get; set; }
Property Value
Type | Default | Description |
---|---|---|
MiniMapAlignment | BottomLeft | A MiniMapAlignment enumeration value. |
Available values:
Name | Description |
---|---|
TopLeft | A mini map aligned to the top-left corner of a map. |
TopRight | A mini map aligned to the top-right corner of a map. |
BottomLeft | A mini map aligned to the bottom-left corner of a map. |
BottomRight | A mini map aligned to the bottom-right corner of a map. |
Example
To customize a mini map’s alignment, set the MiniMap.Alignment
property to the MiniMapAlignment enumeration value.
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 cbAlignment_SelectedIndexChanged(object sender, EventArgs e) {
MiniMapAlignment alignment = (MiniMapAlignment)cbAlignment.SelectedValue;
if (mapControl.MiniMap == null) return;
mapControl.MiniMap.Alignment = alignment;
}
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Alignment property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.