PageColor

DocumentBase.PageColor property

Gets or sets the page color of the document. This property is a simpler version of BackgroundShape.

public Color PageColor { get; set; }

Remarks

This property provides a simple way to specify a solid page color for the document. Setting this property creates and sets an appropriate BackgroundShape.

If the page color is not set (e.g. there is no background shape in the document) returns Empty.

Examples

Shows how to set the background color for all pages of a document.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Hello world!");

doc.PageColor = System.Drawing.Color.LightGray;

doc.Save(ArtifactsDir + "DocumentBase.SetPageColor.docx");

See Also