Back to Devexpress

XRConvert Class

corelibraries-devexpress-dot-xtrareports-dot-ui-0bbb33b9.md

latest2.1 KB
Original Source

XRConvert Class

Enables you to convert value types and adjust values to different measure units.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.Printing.v25.2.Core.dll

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
public class XRConvert :
    GraphicsUnitConverter
vb
Public Class XRConvert
    Inherits GraphicsUnitConverter

Example

This example illustrates how to adjust the document margins from one DPI value (corresponding to tenths of a millimeter) to another (corresponding to device-independent pixels) by using the XRConvert.ConvertMargins method.

csharp
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
// ...

void ConvertMargins(){ 
printableComponentLink.Margins = XRConvert.ConvertMargins(printableComponentLink.Margins, 
    GraphicsDpi.TenthsOfAMillimeter, 
    GraphicsDpi.DeviceIndependentPixel);
}
vb
Imports DevExpress.XtraPrinting
Imports DevExpress.XtraReports.UI
' ...

Private Sub ConvertMargins()
    printableComponentLink.Margins = XRConvert.ConvertMargins(printableComponentLink.Margins, _ 
    GraphicsDpi.TenthsOfAMillimeter, _ 
    GraphicsDpi.DeviceIndependentPixel)
End Sub

Inheritance

Object GraphicsUnitConverter XRConvert

See Also

XRConvert Members

GraphicsUnitConverter

GraphicsDpi

DevExpress.XtraReports.UI Namespace