ParagraphPropertiesBase.SuppressLineNumbers Property
Gets or sets whether to display line numbers for the paragraphs.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v24.1.Core.dll
NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation
Declaration
Property Value
Type | Description |
---|---|
Nullable<Boolean> | true if line numbering is suppressed for all paragraphs; false if line numbers are displayed for all paragraphs in a range; or otherwise, null for a mixture of states. |
Remarks
To enable line numbering, set the SectionLineNumbering.CountBy for the section encompassing the paragraph to a positive integer greater than zero.
Example
using DevExpress.XtraRichEdit.API.Native;
using DevExpress.XtraRichEdit;
using DevExpress.Office;
static void LineNumbering(RichEditDocumentServer wordProcessor) {
// Load a document from a file.
wordProcessor.LoadDocument("Documents\\Grimm.docx", DocumentFormat.OpenXml);
// Access a document.
Document document = wordProcessor.Document;
// Specify the document’s measure units.
document.Unit = DevExpress.Office.DocumentUnit.Inch;
// Access the first document section.
Section sec = document.Sections[0];
// Specify line numbering parameters for the section.
sec.LineNumbering.CountBy = 2;
sec.LineNumbering.Start = 1;
sec.LineNumbering.Distance = 0.25f;
sec.LineNumbering.RestartType = LineNumberingRestart.NewSection;
}
See Also