Back to Devexpress

WatermarkManager.SetText(String) Method

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-watermarkmanager-dot-settext-x28-system-dot-string-x29.md

latest2.1 KB
Original Source

WatermarkManager.SetText(String) Method

Adds a text watermark to all document pages.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
void SetText(
    string text
)
vb
Sub SetText(
    text As String
)

Parameters

NameTypeDescription
textString

The watermark text.

|

Exceptions

TypeDescription
InvalidOperationException

Occurs if the text parameter is null , an empty string, or contains only spaces.

|

Remarks

Watermarks are located in section headers. If a document does not contain headers, a SetText method call adds headers of the Primary type to all document sections.

If the document has multiple sections, this method adds the same watermark to each section and each existing section header (first, primary, odd, or even).

The WatermarkManager.Type property indicates whether the document has watermarks. The property returns WatermarkType.None if the document does not contain watermarks.

See Also

WatermarkManager Interface

WatermarkManager Members

DevExpress.XtraRichEdit.API.Native Namespace