Class Break
Represents a break within a document.
Implements
Inherited Members
Namespace: IronWord.Models
Assembly: IronWord.dll
Syntax
public class Break : ContentElement
Forcing the text after a point onto a new line, column, or page is what Break puts into a Word document. It is the content element a developer adds between runs or paragraphs to control where the flow stops and resumes, so a heading starts on a fresh page or a column wraps where intended.
Construct one with new Break() for a default break, or pass a BreakValue to new Break(BreakValue) when a specific kind is needed, such as a page or column break. The read-only Type property reports which BreakValue the break carries. A Break is added to the document the same way as any other content element, so it slots into a paragraph or section alongside text runs and images. Because Break derives from the shared content-element base, it also inherits Remove, Clone, and Replace, which let a developer take a break out or swap it without rebuilding the surrounding content.
var pageBreak = new Break(BreakValue.Page);The document element tutorial shows how content elements assemble, and the add text how-to walks through placing runs around a break.
Constructors
Break()
Create a new break.
Declaration
public Break()
Break(BreakValue)
Create a new break.
Declaration
public Break(BreakValue type)
Parameters
| Type | Name | Description |
|---|---|---|
| IronSoftware.Abstractions.Word.BreakValue | type | Type of break. |
Properties
Type
Declaration
public BreakValue Type { get; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.Abstractions.Word.BreakValue |