TextWatermarkOptions Class
Contains text watermark options.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v24.1.Core.dll
NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation
Declaration
Related API Members
The following members return TextWatermarkOptions objects:
Example
The code sample below adds a text watermark to all document pages.
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