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

MapOverlay.Padding Property

Gets or sets the map overlay’s padding in device-independent pixels (DIPs).

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.2.dll

NuGet Package: DevExpress.Win.Map

#Declaration

public Padding Padding { get; set; }

#Property Value

Type Description
Padding

A value that specifies the padding.

#Remarks

The following example creates a map overlay and specifies its options such as content, alignment, indents, and size:

A map overlay of the specified size

using DevExpress.XtraMap;
    private void Form1_Load(object sender, EventArgs e) {
        MapOverlay overlayWithText = new MapOverlay {
            Alignment = ContentAlignment.BottomRight,
            JoiningOrientation = Orientation.Vertical,
            Margin = new Padding(0, 4, 8, 8),
            Padding = new Padding(7),
            Size = new Size(700, 40)
        };
        overlayWithText.Items.Add(new MapOverlayTextItem {
            Text = "Copyright © 2022. Microsoft and its suppliers. All rights reserved."
        });
        map.Overlays.Add(overlayWithText);
    }
See Also