RichEditControl.LayoutUnit Property

Gets or sets a unit of measure used for a document layout. Starting from v18.1, the property has no effect.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v20.1.dll

Declaration

[Browsable(false)]
public DocumentLayoutUnit LayoutUnit { get; set; }
<Browsable(False)>
Public Property LayoutUnit As DocumentLayoutUnit

Property Value

Type Description
DocumentLayoutUnit

One of the DocumentLayoutUnit enumeration values. The default is DocumentLayoutUnit.Pixel.

Remarks

Before v.18.1, a document would not accurately print or properly display on devices with different DPI settings. The issue is caused by different measure units used to calculate the display and printout layouts. The display layout is calculated in DocumentLayoutUnit.Pixel by default, which is best suited for a screen display. The print layout is calculated in DocumentLayoutUnit.Document.

Use the LayoutUnit property to adjust the document's look. Set the LayoutUnit to DocumentLayoutUnit.Pixel to improve text rendering and the overall display appearance. For a more accurate layout, specify DocumentLayoutUnit.Twip as the unit of measurement. Note that changing layout units for display may lead to document corruption when appearing on screen.

IMPORTANT

With the RichEditControlCompatibility.EnableLegacyLayoutEngine property set to false, the LayoutUnit property doesn't affect the document model layout calculation. Set the RichEditControlCompatibility.EnableLegacyLayoutEngine property set to true on application startup to manage the document layout manually. Refer to the How to: Perform Actions On Application Startup topic for details.

Implements

See Also