windowsforms-devexpress-dot-xtramap-dot-mapoverlay-9304f097.md
Gets or sets the map overlay’s size in device-independent pixels (DIPs).
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
public Size Size { get; set; }
Public Property Size As Size
| Type | Description |
|---|---|
| Size |
A value that specifies size.
|
The following example creates a map overlay and specifies its options such as content, alignment, indents, and 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);
}
Imports DevExpress.XtraMap
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim overlayWithText As MapOverlay = New MapOverlay With {
.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 With {
.Text = "Copyright © 2022. Microsoft and its suppliers. All rights reserved."
})
map.Overlays.Add(overlayWithText)
End Sub
See Also