Back to Devexpress

How to: Change the Measurement System Exposed in the Print Preview

windowsforms-2420-controls-and-libraries-printing-exporting-examples-print-preview-how-to-change-the-measurement-system-exposed-in-the-print-preview.md

latest1.4 KB
Original Source

How to: Change the Measurement System Exposed in the Print Preview

  • Jan 15, 2024

This example illustrates how to set the system of measurement exposed by the tooltips in a print preview that is shown when manually resizing a document’s margins.

The following methods toggle the measurement system from imperial to metric and vice versa, by switching the DocumentViewerBase.IsMetric property.

csharp
private void SetMillimeterMeasurement() {
    documentViewer1.IsMetric = true;
}

private void SetInchMeasurement() {
    documentViewer1.IsMetric = false;
}
vb
Private Sub SetMillimeterMeasurement()
    DocumentViewer1.IsMetric = True
End Sub

Private Sub SetInchMeasurement()
    DocumentViewer1.IsMetric = False
End Sub

See Also

How to: Preview, Export and Print a Windows Forms Control

How to: Preview, Export and Print an XtraReport