Back to Devexpress

RichEditControlCompatibility.KeepLastParagraphOnDeletion Property

officefileapi-devexpress-dot-xtrarichedit-dot-richeditcontrolcompatibility-e98e10dc.md

latest2.1 KB
Original Source

RichEditControlCompatibility.KeepLastParagraphOnDeletion Property

A static property that enables you to retain the behavior when the last paragraph cannot be deleted.

Namespace : DevExpress.XtraRichEdit

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
[DefaultValue(false)]
public static bool KeepLastParagraphOnDeletion { get; set; }
vb
<DefaultValue(False)>
Public Shared Property KeepLastParagraphOnDeletion As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

True , to retain the former behavior and not remove the last paragraph when the last range is deleted; otherwise, false.

|

Remarks

Consider a sample document containing four paragraphs:

When attempting to delete the last paragraph, the paragraph range is deleted but the last paragraph remains. This is the default behavior in recent versions:

When the KeepLastParagraphOnDeletion is set to false , the last paragraph is deleted with the paragraph range:

See Also

RichEditControlCompatibility Class

RichEditControlCompatibility Members

DevExpress.XtraRichEdit Namespace