DXRichEditCopyPasteOptions.PasteUnstyledRtfMode Property
Specifies how to apply formatting to a pasted RTF text which has no defined styles.
Namespace: DevExpress.Xpf.RichEdit
Assembly: DevExpress.Xpf.RichEdit.v24.2.dll
NuGet Package: DevExpress.Wpf.RichEdit
#Declaration
#Property Value
Type | Description |
---|---|
Paste |
A Paste The default is Paste |
Available values:
Name | Description |
---|---|
Keep |
Does not apply formatting of the destination document to the pasted text. |
Use |
Applies the style characteristics of the surrounding text to the pasted text except for formatting specified in RTF of the text being pasted. |
#Property Paths
You can access this nested property as listed below:
Object Type | Path to Paste |
---|---|
Rich |
|
#Remarks
Note
We recommend that you use the DXRich
The default option PasteMode.UseDestinationStyles uses the style definition of the document where the text is being pasted. If the pasted RTF text does not have styles (such as text copied from MS WordPad), the text takes on the style characteristics of the paragraph where it is pasted. The text also takes on any direct formatting specified in RTF. However, text formatted with Times New Roman, 12 is presumed to be free of font formatting. Hence, the font Times New Roman, 12 is substituted with the default document font.
Another option, PasteMode.KeepSourceFormatting, applies direct formatting contained in the source RTF to the text being inserted, so it looks exactly like the source document from which it was copied.