New to Telerik UI for WinForms? Start a free 30-day trial

Creates and positions the image or text watermark for a paged section.

Definition

Namespace:Telerik.WinForms.Documents.UI.UIProviders

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class WatermarkUIProvider : IUIProvider

Inheritance: objectWatermarkUIProvider

Implements: IUIProvider

Constructors

Initializes a provider for a section and subscribes to its current header's watermark changes.

C#
public WatermarkUIProvider(SectionLayoutBox sectionBox)
Parameters:sectionBoxSectionLayoutBox

The section whose watermark should be displayed.

Properties

Gets the section's layout bounds.

C#
public RectangleF BoundingRectangle { get; }

Implements: IUIProvider.BoundingRectangle

Gets the page-sized clip geometry applied by the watermark layer.

C#
public Geometry ClippingGeometry { get; }

Gets or sets the layer that hosts the watermark visual.

C#
public IUILayer ContainingLayer { get; set; }

Implements: IUIProvider.ContainingLayer

Gets the header whose watermark settings are observed by this provider.

C#
public Header CurrentHeader { get; }

Gets the most recently supplied layer-update context.

C#
public UILayerUpdateContext CurrentUpdateContext { get; }

Gets whether watermark settings changed or the section now uses a different header.

C#
public bool IsInvalidated { get; }

Implements: IUIProvider.IsInvalidated

Gets whether the section layout box has been removed.

C#
public bool IsRemoved { get; }

Implements: IUIProvider.IsRemoved

Gets the section whose page is displayed by this provider.

C#
public SectionLayoutBox SectionBox { get; }

Methods

Centers the configured watermark on the page and updates the page clipping geometry.

C#
public void Arrange(UILayerUpdateContext uILayerUpdateContext)
Parameters:uILayerUpdateContextUILayerUpdateContext

The current layer context.

Implements: IUIProvider.Arrange(UILayerUpdateContext)

Creates the configured image or text watermark, or returns no element when the section has no watermark.

C#
public IEnumerable<UIElement> GetUIElements(UILayerUpdateContext context)
Parameters:contextUILayerUpdateContext

The current layer context.

Returns:

IEnumerable<UIElement>

The watermark visual when one is configured.

Implements: IUIProvider.GetUIElements(UILayerUpdateContext)

Detaches the header event handler, clears transient visual properties, and returns the visual to the object pool.

C#
public void ReleaseElements()

Implements: IUIProvider.ReleaseElements()

Does nothing; watermark-setting changes mark the provider invalidated so its visual can be recreated.

C#
public void UpdateUI(UILayerUpdateContext uILayerUpdateContext)
Parameters:uILayerUpdateContextUILayerUpdateContext

The current layer context.

Implements: IUIProvider.UpdateUI(UILayerUpdateContext)