officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-paragraphstylecollection.md
Creates a new paragraph style.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
ParagraphStyle CreateNew()
Function CreateNew As ParagraphStyle
| Type | Description |
|---|---|
| ParagraphStyle |
A ParagraphStyle object representing a paragraph style.
|
Use the ParagraphStyleCollection.Add method to add a newly created style to the collection.
The following code snippets (auto-collected from DevExpress Examples) contain references to the CreateNew() method.
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#L96
//and specify the required properties
ParagraphStyle chapterStyle = document.ParagraphStyles.CreateNew();
chapterStyle.Name = "MyTitleStyle";
winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Styles.cs#L42
{
pstyle = document.ParagraphStyles.CreateNew();
pstyle.Name = "MyPStyle";
wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/StylesActions.cs#L42
{
pstyle = document.ParagraphStyles.CreateNew();
pstyle.Name = "MyPStyle";
winforms-richedit-table-of-contents-practical-guide/CS/Form1.cs#L118
if (paragraphStyle == null) {
paragraphStyle = Document.ParagraphStyles.CreateNew();
paragraphStyle.Name = styleName;
word-document-api-examples/CS/CodeExamples/StylesActions.cs#L74
{
pstyle = document.ParagraphStyles.CreateNew();
pstyle.Name = "MyPStyle";
winforms-rich-edit-text-formatting/VB/Text Formatting Example/Form1.vb#L91
'and specify the required properties
Dim chapterStyle As ParagraphStyle = document.ParagraphStyles.CreateNew()
chapterStyle.Name = "MyTitleStyle"
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Styles.vb#L38
If pstyle Is Nothing Then
pstyle = document.ParagraphStyles.CreateNew()
pstyle.Name = "MyPStyle"
wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/StylesActions.vb#L35
If pstyle Is Nothing Then
pstyle = document.ParagraphStyles.CreateNew()
pstyle.Name = "MyPStyle"
word-document-api-examples/VB/CodeExamples/StylesActions.vb#L62
If pstyle Is Nothing Then
pstyle = document.ParagraphStyles.CreateNew()
pstyle.Name = "MyPStyle"
winforms-richedit-table-of-contents-practical-guide/VB/Form1.vb#L109
If paragraphStyle Is Nothing Then
paragraphStyle = Document.ParagraphStyles.CreateNew()
paragraphStyle.Name = styleName
See Also
ParagraphStyleCollection Interface