DocumentShadeFormData Property
Specifies whether to turn on the gray shading on form fields.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.9
Syntax
public bool ShadeFormData { get; set; }

Property Value

Type: Boolean
Examples
Shows how to apply gray shading to bookmarks.
[C#]

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// By default, bookmarked text is highlighted gray
Assert.IsTrue(doc.ShadeFormData);

builder.Write("Text before bookmark. ");

builder.InsertTextInput("My bookmark", TextFormFieldType.Regular, "",
    "If gray shading is turned on, this is the text that will have a gray background.", 0);

// Our bookmarked text will appear gray here
doc.Save(ArtifactsDir + "Document.ShadeFormDataTrue.docx");

// In this file, shading will be turned off and the bookmarked text will blend in with the other text
doc.ShadeFormData = false;
doc.Save(ArtifactsDir + "Document.ShadeFormDataFalse.docx");
See Also