Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    TextWatermarkOptions Class

    Contains text watermark options.

    Namespace: DevExpress.XtraRichEdit.API.Native

    Assembly: DevExpress.RichEdit.v25.1.Core.dll

    NuGet Package: DevExpress.RichEdit.Core

    #Declaration

    public class TextWatermarkOptions

    The following members return TextWatermarkOptions objects:

    #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.Docx);
    }
    

    #Inheritance

    Object
    TextWatermarkOptions
    See Also