DocumentBuilderUnderline Property
Gets/sets underline type for the current font.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.12
Syntax
public Underline Underline { get; set; }

Property Value

Type: Underline
Examples
Shows how to set and edit a document builder's underline.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Set a new style for our underline
builder.Underline = Underline.Dash;

// Same object as DocumentBuilder.Font.Underline
Assert.AreEqual(builder.Underline, builder.Font.Underline);
Assert.AreEqual(Underline.Dash, builder.Font.Underline);

// These properties will be applied to the underline as well
builder.Font.Color = Color.Blue;
builder.Font.Size = 32;

builder.Writeln("Underlined text.");

doc.Save(ArtifactsDir + "DocumentBuilder.Underline.docx");
See Also