officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-sectionlinenumbering.md
Gets or sets the line number increments to be displayed in the current document.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
int CountBy { get; set; }
Property CountBy As Integer
| Type | Description |
|---|---|
| Int32 |
An integer by which the line number increments.
|
The CountBy property specifies which lines will display a line number. By default, it is set to zero and line numbering is suppressed. To switch the line numbering on, specify the CountBy as a non-zero positive integer. For a line number on every line, set the CountBy to 1.
The following code snippets (auto-collected from DevExpress Examples) contain references to the CountBy property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-spreadsheet-chart-api/CS/SpreadsheetWPFChartAPISamples/CodeUtils/SyntaxHightlight.cs#L48
document.Sections[0].Page.Width = Units.InchesToDocumentsF(100);
document.Sections[0].LineNumbering.CountBy = 1;
document.Sections[0].LineNumbering.RestartType = LineNumberingRestart.Continuous;
document.Sections[0].Page.Width = Units.InchesToDocumentsF(100);
document.Sections[0].LineNumbering.CountBy = 1;
document.Sections[0].LineNumbering.RestartType = LineNumberingRestart.Continuous;
winforms-spreadsheet-chart-api/CS/SpreadsheetChartAPISamples/CodeUtils/SyntaxHightlight.cs#L48
document.Sections[0].Page.Width = Units.InchesToDocumentsF(100);
document.Sections[0].LineNumbering.CountBy = 1;
document.Sections[0].LineNumbering.RestartType = LineNumberingRestart.Continuous;
document.Sections[0].Page.Width = Units.InchesToDocumentsF(100);
document.Sections[0].LineNumbering.CountBy = 1;
document.Sections[0].LineNumbering.RestartType = LineNumberingRestart.Continuous;
winforms-richedit-enable-line-numbering-and-count-document-rows/CS/LineNumberingExample/Form1.cs#L39
richEditControl1.Document.Sections[0].LineNumbering.Start = 1;
richEditControl1.Document.Sections[0].LineNumbering.CountBy = 2;
richEditControl1.Document.Sections[0].LineNumbering.Distance = 75f;
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/PageLayout.vb#L12
Dim sec As DevExpress.XtraRichEdit.API.Native.Section = document.Sections(0)
sec.LineNumbering.CountBy = 2
sec.LineNumbering.Start = 1
wpf-spreadsheet-chart-api/VB/SpreadsheetWPFChartAPISamples/CodeUtils/SyntaxHightlight.vb#L49
document.Sections(0).Page.Width = Units.InchesToDocumentsF(100)
document.Sections(0).LineNumbering.CountBy = 1
document.Sections(0).LineNumbering.RestartType = LineNumberingRestart.Continuous
document.Sections(0).Page.Width = Units.InchesToDocumentsF(100)
document.Sections(0).LineNumbering.CountBy = 1
document.Sections(0).LineNumbering.RestartType = LineNumberingRestart.Continuous
winforms-spreadsheet-chart-api/VB/SpreadsheetChartAPISamples/CodeUtils/SyntaxHightlight.vb#L50
document.Sections(0).Page.Width = Units.InchesToDocumentsF(100)
document.Sections(0).LineNumbering.CountBy = 1
document.Sections(0).LineNumbering.RestartType = LineNumberingRestart.Continuous
document.Sections(0).Page.Width = Units.InchesToDocumentsF(100)
document.Sections(0).LineNumbering.CountBy = 1
document.Sections(0).LineNumbering.RestartType = LineNumberingRestart.Continuous
See Also