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

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.

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

private void SetInchMeasurement() {
    documentViewer1.IsMetric = false;
}
TIP

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E62.

See Also