officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-paragraphpropertiesbase-83a04755.md
Gets or sets the paragraph’s outline level.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
int? OutlineLevel { get; set; }
Property OutlineLevel As Integer?
| Type | Description |
|---|---|
| Nullable<Int32> |
A level number, or null for a mixture of values.
|
Outline levels are used to build a table of contents without changing the appearance of your text.
When a document is exported to HTML, the outline level specifies the tag in which the paragraph is enclosed. Outline levels from1 to 6 results in H1 - H6 tags respectively, paragraphs with outline levels higher than 6 are exported as text enclosed in P tag.
The following code snippets (auto-collected from DevExpress Examples) contain references to the OutlineLevel 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.
winforms-rich-edit-text-formatting/CS/Text Formatting Example/Form1.cs#L104
chapterStyle.SpacingAfter = Units.InchesToDocumentsF(0.2f);
chapterStyle.OutlineLevel = 2;
winforms-richedit-table-of-contents-practical-guide/CS/Form1.cs#L121
paragraphStyle.Parent = Document.ParagraphStyles["Normal"];
paragraphStyle.OutlineLevel = level;
Document.ParagraphStyles.Add(paragraphStyle);
word-processing-table-of-contents-practical-guide/CS/Program.cs#L157
paragraphStyle.Parent = document.ParagraphStyles["Normal"];
paragraphStyle.OutlineLevel = level;
document.ParagraphStyles.Add(paragraphStyle);
winforms-rich-edit-text-formatting/VB/Text Formatting Example/Form1.vb#L99
chapterStyle.SpacingAfter = Units.InchesToDocumentsF(0.2F)
chapterStyle.OutlineLevel = 2
winforms-richedit-table-of-contents-practical-guide/VB/Form1.vb#L112
paragraphStyle.Parent = Document.ParagraphStyles("Normal")
paragraphStyle.OutlineLevel = level
Document.ParagraphStyles.Add(paragraphStyle)
word-processing-table-of-contents-practical-guide/VB/Program.vb#L151
paragraphStyle.Parent = document.ParagraphStyles("Normal")
paragraphStyle.OutlineLevel = level
document.ParagraphStyles.Add(paragraphStyle)
See Also
ParagraphPropertiesBase Interface