ShadeFormData

Document.ShadeFormData property

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

public bool ShadeFormData { get; set; }

Examples

Shows how to apply gray shading to form fields.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Write("Hello world! ");
builder.InsertTextInput("My form field", TextFormFieldType.Regular, "",
    "Text contents of form field, which are shaded in grey by default.", 0);

// We can turn the grey shading off, so the bookmarked text will blend in with the other text.
doc.ShadeFormData = useGreyShading;
doc.Save(ArtifactsDir + "Document.ShadeFormData.docx");

See Also