Version

ApplyParagraphListStyle Method (RichTextDocument)

Applies the specified list style to paragraphs intersecting the specified span, in effect making the paragraphs into a bulleted or numbered list according to the list style referred to by the specified listStyleId.
Syntax
'Declaration
 
Public Sub ApplyParagraphListStyle( _
   ByVal span As DocumentSpan, _
   ByVal listStyleId As String, _
   ByRef error As String _
) 
public void ApplyParagraphListStyle( 
   DocumentSpan span,
   string listStyleId,
   out string error
)

Parameters

span
Paragraphs intersecting this span will be affected.
listStyleId
Id of a ListStyle in DocumentRootNode's DocumentRootNode.Styles collection. If a list style with this id doesn't exist in the styles collection then it's searched in the AvailableStyles collection and if one is found then it's moved into the DocumentRootNode's Styles collection. Otherwise an error is set and this method takes no action.
error
If an error occurs, this parameter will be set to the error message.
Remarks

If one or more paragraphs are already part of a list, they will be removed from that list and made into a separate list using the specified list style. If the list style however matches the existing list style of such paragraphs, then the paragraphs will remain in their current list without any modification.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also