Back to Devexpress

MapControl.PrintOptions Property

windowsforms-devexpress-dot-xtramap-dot-mapcontrol-440d7f98.md

latest2.3 KB
Original Source

MapControl.PrintOptions Property

Provides access to the map control’s printing options.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public PrintOptions PrintOptions { get; }
vb
Public ReadOnly Property PrintOptions As PrintOptions

Property Value

TypeDescription
PrintOptions

A PrintOptions object which provides access to the map’s printing options.

|

Remarks

The object returned provides a set of properties which specify the map’s elements that are to be printed. Refer to the PrintOptions class description for a list of the available options and their descriptions.

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

ShowPrintPreview()

Print()

MapControl Class

MapControl Members

DevExpress.XtraMap Namespace