ListFormatApplyNumberDefault Method

Starts a new default numbered list and applies it to the paragraph.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public void ApplyNumberDefault()
Remarks

This is a shortcut method that creates a new list using the default numbered template, applies it to the paragraph and selects the 1st list level.

Examples
Shows how to apply default bulleted or numbered list formatting to paragraphs when using DocumentBuilder.
DocumentBuilder builder = new DocumentBuilder();

builder.Writeln("Aspose.Words allows:");
builder.Writeln();

// Start a numbered list with default formatting
builder.ListFormat.ApplyNumberDefault();
builder.Writeln("Opening documents from different formats:");

// Go to second list level, add more text
builder.ListFormat.ListIndent();
builder.Writeln("DOC");
builder.Writeln("PDF");
builder.Writeln("HTML");

// Outdent to the first list level
builder.ListFormat.ListOutdent();
builder.Writeln("Processing documents");
builder.Writeln("Saving documents in different formats:");

// Indent the list level again
builder.ListFormat.ListIndent();
builder.Writeln("DOC");
builder.Writeln("PDF");
builder.Writeln("HTML");
builder.Writeln("MHTML");
builder.Writeln("Plain text");

// Outdent the list level again
builder.ListFormat.ListOutdent();
builder.Writeln("Doing many other things!");

// End the numbered list
builder.ListFormat.RemoveNumbers();
builder.Writeln();

builder.Writeln("Aspose.Words main advantages are:");
builder.Writeln();

// Start a bulleted list with default formatting
builder.ListFormat.ApplyBulletDefault();
builder.Writeln("Great performance");
builder.Writeln("High reliability");
builder.Writeln("Quality code and working");
builder.Writeln("Wide variety of features");
builder.Writeln("Easy to understand API");

// End the bulleted list
builder.ListFormat.RemoveNumbers();

builder.Document.Save(ArtifactsDir + "Lists.ApplyDefaultBulletsAndNumbers.doc");
See Also