Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
    Supported Formats
   [Expand]Getting Started
   [Expand]RichEditControl Document
   [Expand]Fields
    Text Formatting
    Import and Export
   [Expand]Page Layout
    Printing
    AutoCorrect
    Mail Merge
    Restrictions and Protection
    Syntax Highlighting
    Traversing the Document
   [Collapse]Visual Elements
    [Collapse]Rich Edit Control
      Editor Elements
      Reviewing Pane
      Horizontal Ruler
      Vertical Ruler
    [Expand]Command UI
     Pop-up Menus
    [Expand]Dialogs
    Services
    Events
    Commands
    HTML Tag Support
   [Expand]Examples
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[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

Horizontal Ruler

The horizontal ruler is located above the document. It displays the typing line length and allows you to adjust left and right margins and indents, set tabs, and change column widths.

Functionality

Action

API

Adjust Page Margins (available only in the Page Layout view) Position the cursor on the ruler at the current margin so it transforms into the double-headed horizontal arrow. Drag it to increase or decrease the margin. The SectionMargins.Left and SectionMargins.Right properties.

Use notation:
richEditControl1.Document.Sections[0].Margins.Left, richEditControl1.Document.Sections[0].Margins.Right

Adjust Paragraph Margins Drag the First Line Indent, Left Indent or the Right Indent markers. The Paragraph.FirstLineIndent, Paragraph.LeftIndent or the Paragraph.RightIndent properties.
Set Tabs Click the Tab Alignment Selector to toggle the tab alignment to the desired type. After that, click within the ruler to set the tab stop. The TabInfo.Alignment and TabInfo.Position properties.
Adjust Column Width Position the cursor on the ruler at the text boundaries, so that it transforms into the double-headed horizontal arrow. Drag it to adjust the column width. The SectionColumn.Width and SectionColumn.Spacing properties.
Adjust Table Column Width When the caret is in the table, position the cursor on the ruler at the column boundaries, so that it transforms into the double-headed horizontal arrow. Drag it to adjust the column width. How to: Create a Table with Fixed Column Width

To hide the ruler to get more space for your document, set the RulerOptions.Visibility to RichEditScrollbarVisibility.Hidden using the following notation.

By default, the ruler shows the DocumentUnit.Document (1/300 of an inch) measurement units. To change the ruler measurements, specify the control's measurement unit using the RichEditControl.Unit property. When a document is loaded in the RichEditControl, you can set the measurement unit with the Document.Unit property. The document setting is in effect until another document is loaded or a new document is created.

Tip

Double click on any Indent Marker to open the Paragraph Dialog.
Double click on any Tab Stop Marker to open the Tabs Dialog.

Is this topic helpful?​​​​​​​