BorderClearFormatting Method

Resets border properties to default values.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public void ClearFormatting()
Remarks
When border properties are reset to default values, the border is invisible.
Examples
Shows how to remove borders from a paragraph.
Document doc = new Document(MyDir + "Borders.docx");

DocumentBuilder builder = new DocumentBuilder(doc);
BorderCollection borders = builder.ParagraphFormat.Borders;

foreach (Border border in borders) border.ClearFormatting();

builder.CurrentParagraph.Runs[0].Text = "Paragraph with no border";

doc.Save(ArtifactsDir + "Border.NoBorder.doc");
See Also