Back to Devexpress

ParagraphPropertiesBase.OutlineLevel Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-paragraphpropertiesbase-83a04755.md

latest4.4 KB
Original Source

ParagraphPropertiesBase.OutlineLevel Property

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

Declaration

csharp
int? OutlineLevel { get; set; }
vb
Property OutlineLevel As Integer?

Property Value

TypeDescription
Nullable<Int32>

A level number, or null for a mixture of values.

|

Remarks

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

csharp
chapterStyle.SpacingAfter = Units.InchesToDocumentsF(0.2f);
chapterStyle.OutlineLevel = 2;

winforms-richedit-table-of-contents-practical-guide/CS/Form1.cs#L121

csharp
paragraphStyle.Parent = Document.ParagraphStyles["Normal"];
paragraphStyle.OutlineLevel = level;
Document.ParagraphStyles.Add(paragraphStyle);

word-processing-table-of-contents-practical-guide/CS/Program.cs#L157

csharp
paragraphStyle.Parent = document.ParagraphStyles["Normal"];
paragraphStyle.OutlineLevel = level;
document.ParagraphStyles.Add(paragraphStyle);

winforms-rich-edit-text-formatting/VB/Text Formatting Example/Form1.vb#L99

vb
chapterStyle.SpacingAfter = Units.InchesToDocumentsF(0.2F)
chapterStyle.OutlineLevel = 2

winforms-richedit-table-of-contents-practical-guide/VB/Form1.vb#L112

vb
paragraphStyle.Parent = Document.ParagraphStyles("Normal")
paragraphStyle.OutlineLevel = level
Document.ParagraphStyles.Add(paragraphStyle)

word-processing-table-of-contents-practical-guide/VB/Program.vb#L151

vb
paragraphStyle.Parent = document.ParagraphStyles("Normal")
paragraphStyle.OutlineLevel = level
document.ParagraphStyles.Add(paragraphStyle)

See Also

ParagraphPropertiesBase Interface

ParagraphPropertiesBase Members

DevExpress.XtraRichEdit.API.Native Namespace