Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

#Declaration

[DefaultValue(false)]
public static bool KeepLastParagraphOnDeletion { get; set; }

#Property Value

Type Default Description
Boolean false

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:

KeepLastParagraphOnDeletion_before

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:

KeepLastParagraphOnDeletion_true

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

KeepLastParagraphOnDeletion_false

See Also