Skip to main content
A newer version of this page is available. .
All docs
V21.2
.NET Framework 4.5.2+

TextWatermarkOptions Class

Contains text watermark options.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v21.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

Declaration

public class TextWatermarkOptions

Example

The code sample below adds a text watermark to all document pages.

image

using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
    wordProcessor.LoadDocument("DocumentProtection.docx");

    TextWatermarkOptions textWatermarkOptions = new TextWatermarkOptions();
    textWatermarkOptions.Color = System.Drawing.Color.LightGray;
    textWatermarkOptions.FontFamily = "Calibri";
    textWatermarkOptions.Layout = WatermarkLayout.Diagonal;
    textWatermarkOptions.Semitransparent = true;

    wordProcessor.Document.WatermarkManager.SetText("CONFIDENTIAL", textWatermarkOptions);
    wordProcessor.SaveDocument("DocumentProtection_new.docx", DocumentFormat.OpenXml);
}

Inheritance

Object
TextWatermarkOptions
See Also