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
    Overview
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Concepts
   [Expand]Visual Elements
   [Collapse]Examples
    [Expand]Files
    [Expand]Text
    [Collapse]Formatting
      How to: Change Formatting of Selected Text
      How to: Change Formatting of the Current Paragraph
      How to: Specify Default Document Formatting
    [Expand]Styles
    [Expand]Lists
    [Expand]Pictures
    [Expand]Text Boxes
    [Expand]Tables
    [Expand]Layout
    [Expand]Automation
    [Expand]Search and Replace
    [Expand]Mail Merge
    [Expand]Spell Check
    [Expand]Export-Import
    [Expand]Printing
    [Expand]Protection
    [Expand]User Interface Customization
    [Expand]Miscellaneous
    [Expand]Commands
   [Expand]Member Tables
  [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]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]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Specify Default Document Formatting

You can use one of the following approaches to specify default document formatting.

Expanded Set Default Formatting to the RichEditControl

Show Me

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

The static RichEditControlCompatibility.DefaultFontSize and RichEditControlCompatibility.DefaultFontName properties set the default font settings for all RichEditControl instances in the application. It is recommended to place them before initialization of all controls, in the Main method, as illustrated in the following code.

Expanded Set Default Formatting to the Specific Document

For the document loaded in the RichEditControl, you can specify default formatting characteristics individually using the Document.DefaultCharacterProperties and Document.DefaultParagraphProperties settings. These settings override the RichEditControlCompatibility settings.

Show Me

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

Tip

To copy default document formatting from one document to another, use the Assign method. The code snippet below copies default document formatting characteristics from the document loaded in the richEditControl2 control to the document contained in the richEditControl1 :

Expanded See Also

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