DocumentBasePageColor Property

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

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.7.0


public Color PageColor { get; set; }

Property Value

Type: Color


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.


Shows how to set the page color.
Document doc = new Document();

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

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

See Also