Back to Devexpress

MapPrintSizeMode Enum

windowsforms-devexpress-dot-xtramap-f5f5ffa2.md

latest3.4 KB
Original Source

MapPrintSizeMode Enum

Lists the values specifying size modes used when a map is printed or exported.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public enum MapPrintSizeMode
vb
Public Enum MapPrintSizeMode

Members

NameDescription
Normal

A map is printed in the identical size it appears on the form.

| | Zoom |

A map is resized proportionally (without clipping), so that it best fits the page on which it is printed.

| | Stretch |

A map is stretched or shrunk to fit the page on which it is printed.

|

The following properties accept/return MapPrintSizeMode values:

Remarks

This enumeration is used to specify the value of the PrintOptions.SizeMode of the instance stored in the MapControl.PrintOptions property. These options are used by printing (MapControl.ShowPrintPreview, MapControl.ShowRibbonPrintPreview, MapControl.ShowPrintDialog) and exporting methods (MapControl.ExportToImage, MapControl.ExportToMht, MapControl.ExportToPdf, MapControl.ExportToRtf, MapControl.ExportToXls, MapControl.ExportToXlsx).

Example

csharp
void InitializeSizeModeComboBox() {
    cbSizeMode.DataSource = Enum.GetValues(typeof(MapPrintSizeMode));
}
private void cbSizeMode_SelectedIndexChanged(object sender, EventArgs e) {
    MapPrintSizeMode mode = (MapPrintSizeMode)cbSizeMode.SelectedValue;
    mapControl.PrintOptions.SizeMode = mode;
}
vb
Private Sub InitializeSizeModeComboBox()
    cbSizeMode.DataSource = System.Enum.GetValues(GetType(MapPrintSizeMode))
End Sub
Private Sub cbSizeMode_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles cbSizeMode.SelectedIndexChanged
    Dim mode As MapPrintSizeMode = DirectCast(cbSizeMode.SelectedValue, MapPrintSizeMode)
    mapControl.PrintOptions.SizeMode = mode
End Sub

See Also

DevExpress.XtraMap Namespace