Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
   [Expand]Getting Started
   [Expand]RichEditControl Document
   [Expand]Fields
    Text Formatting
    Import and Export
   [Collapse]Page Layout
     Table of Contents
     Line Numbering
     Measure Units
     Layout API
    Printing
    Spell Checking
    AutoCorrect
    Mail Merge
    Restrictions and Protection
    Syntax Highlighting
    Traversing the Document
   [Expand]Visual Elements
    Services
    Events
    Commands
   [Expand]Member Tables
    Keyboard Shortcuts
    HTML Tag Interpretation
   [Expand]Examples
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Line Numbering

Click Line Numbering Options to invoke the Line Numbers Dialog.

To switch line numbering On, specify the SectionLineNumbering.CountBy property to any non-zero positive integer value. Other parameters can be set up as illustrated below.

Note

The RichEditView.AllowDisplayLineNumbers enables you to show or hide line numbers in a view.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T531470.

The following code snippet enables line numbering for the first section in the loaded document using the Section.LineNumbering property. Line numbering starts at number one and restarts at the new section. Numbers are displayed on each second line and are indented from the text at a distance equal to 75 documents (0.25 of an inch).

Line numberings are allowed to display in SimpleView and DraftView. To make line numbers visible, the left padding should be increased to 60 points.

Font face and color are specified using the Line Number document style.

Expanded See Also

How would you rate this topic?​​​​​​​