[Expand]General Information
[Collapse]WinForms Controls
 [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]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
    Supported Formats
   [Expand]Getting Started
   [Collapse]RichEditControl Document
    [Expand]Document Structure
    [Collapse]Document Elements
      Positions and Ranges
      Inline Pictures
      Hyperlinks and Bookmarks
      Headers and Footers
      Range Permissions
      Numbered and Bulleted Lists
      Text Boxes
      Document Properties
    Text Formatting
    Import and Export
   [Expand]Page Layout
    Spell Checking
    Mail Merge
    Restrictions and Protection
    Syntax Highlighting
   [Expand]Visual Elements
    Keyboard Shortcuts
    HTML Tag Support
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst 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]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)


The document model contains collections of styles. There are three types of styles - a paragraph style, a character style and a table style. Styles are accessible via the Document.CharacterStyles, Document.ParagraphStyles and the Document.TableStyles properties respectively.

Use the CharacterStyleCollection.CreateNew, ParagraphStyleCollection.CreateNew and TableStyleCollection.CreateNew methods to create new styles.

When creating a new style, you do not have to specify all formatting properties. Instead, you can specify the parent style (CharacterStyle.Parent, ParagraphStyle.Parent and the TableStyle.Parent properties), and modify only the required characteristics.

Styles can be linked. A linked style can act as a paragraph style or a character style, depending on the range to which it is applied. If a linked style is applied to a selection that does not include an entire paragraph, the selected text is formatted with the character formatting settings of the linked styles. If a selection includes an entire paragraph, both character and paragraph formatting settings are applied. If a selection is just a caret position and contains no characters, the linked style behaves like a paragraph style.

You can delete a style from the collection of styles in the document, using the CharacterStyleCollection.Delete, the ParagraphStyleCollection.Delete or the TableStyleCollection.Delete methods. A deleted style can no longer be applied to text or saved in a document file.

Styles are inherent to the document, so you cannot add a style contained in the style collection of one document to the style collection of another document. You should create a new style and copy its properties, one by one. When performing mail merge, use the MailMergeOptions.CopyTemplateStyles property to copy template styles to the merged document.

End-users can modify existing styles by utilizing the Style Editor Dialog.

Expanded See Also

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