Skip to main content
.NET Framework 4.5.2+

Paragraph.ContextualSpacing Property

Gets or sets whether to suppress addition of additional space (contextual spacing) between paragraphs of the same style.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core


public abstract bool ContextualSpacing { get; set; }

Property Value

Type Description

true to remove extra spacing between paragraphs, otherwise, false.


The line spacing is increased to mark the change from one paragraph to another. Set the ContextualSpacing to true to prevent this behavior.

You can turn the ContextualSpacing option on or off by selecting or clearing Don’t add space between paragraphs of the same style checkbox in the Paragraph Dialog.


If the ContextualSpacing is set to true, RichEditControl (or RichEditDocumentServer) adds an additional space between paragraphs of the same style in HTML text so it looks closer to the one rendered in a browser. To remove this space in HTML text, disable the ContextualSpacing option for paragraphs in the document and set the Paragraph.SpacingAfter property of the current paragraph and the Paragraph.SpacingBefore property of the next paragraph to 0.

See Also