RichEditControl.LayoutUnit Property
Gets or sets a unit of measure used for a control’s layout. Starting from v18.1, this property has no effect.
Namespace: DevExpress.Xpf.RichEdit
Assembly: DevExpress.Xpf.RichEdit.v24.2.dll
NuGet Package: DevExpress.Wpf.RichEdit
#Declaration
[Browsable(false)]
public DocumentLayoutUnit LayoutUnit { get; set; }
#Property Value
Type | Description |
---|---|
Document |
One of the Document The default is Document |
Available values:
Name | Description |
---|---|
Document | Specifies documents (one three-hundredths of an inch) as measurement units. |
Twip | Specifies twips (1,440 twips equal one inch, and 567 twips equal one centimeter) as measurement units. |
Pixel | Specifies pixels as measurement units. |
#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 documents’ 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.
Important
With the Rich