HypernovaDesktop Components · docs
Binarymission
WinForms › Watermark Text Box › WatermarkProvider

WatermarkProvider

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.InputControls

Draws the watermark shown over a control while it is empty, using a label for the watermark text and a picture box for the watermark image.

public sealed class WatermarkProvider : WatermarkControlProvider

Inherits from / implements: WatermarkControlProvider

Members at a glance

WatermarkProviderInitializes a new instance of the WatermarkProvider class.
ShouldRenderWatermarkImageWhether the image part of the watermark is drawn. Text-only watermarks leave it false.
WatermarkImageThe image drawn as the watermark, or null for a text-only watermark.
WatermarkImageSizeThe size the watermark image is drawn at.
WatermarkTextThe text drawn as the watermark while the control is empty.
OnSizeChangedRaises the SizeChanged event. The provider overrides it to lay its two children out again: a change of watermark image does that too, but a text-only watermark - the ordinary case - has no image to change.

Constructors

WatermarkProvider

public WatermarkProvider()

Initializes a new instance of the WatermarkProvider class.

Properties

ShouldRenderWatermarkImage

public override bool ShouldRenderWatermarkImage

Whether the image part of the watermark is drawn. Text-only watermarks leave it false.

WatermarkImage

public override Bitmap WatermarkImage

The image drawn as the watermark, or null for a text-only watermark.

WatermarkImageSize

public override Size WatermarkImageSize

The size the watermark image is drawn at.

WatermarkText

public override string WatermarkText

The text drawn as the watermark while the control is empty.

Methods

OnSizeChanged

protected override void OnSizeChanged(EventArgs e)

Raises the SizeChanged event. The provider overrides it to lay its two children out again: a change of watermark image does that too, but a text-only watermark - the ordinary case - has no image to change.

e
The data for the event.