WinForms › Watermark Text Box › IWatermarkProvider
IWatermarkProvider
interface.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.InputControls
The settings a watermark surface exposes: the prompt text and an optional picture beside it.
public interface IWatermarkProvider
Remarks
WatermarkControlProvider implements this interface as a
UserControl with plain properties, and
WatermarkProvider – the surface a WatermarkTextBox uses – derives from
that.
Note
A WatermarkTextBox accepts only a WatermarkProvider, which is
sealed, so an implementation of this interface cannot be plugged into it.
Members at a glance
| Properties | |
|---|---|
ShouldRenderWatermarkImage | Gets or sets whether the WatermarkImage is drawn beside the prompt text. |
WatermarkImage | Gets or sets the picture shown beside the prompt text, or null for none. |
WatermarkImageSize | Gets or sets the size, in pixels, the WatermarkImage is drawn at. |
WatermarkText | Gets or sets the prompt text shown while the host control is empty. |
Properties
ShouldRenderWatermarkImage
bool ShouldRenderWatermarkImage
Gets or sets whether the WatermarkImage is drawn beside the prompt text.
WatermarkImage
Bitmap WatermarkImage
Gets or sets the picture shown beside the prompt text, or null for none.
WatermarkImageSize
Size WatermarkImageSize
Gets or sets the size, in pixels, the WatermarkImage is drawn at.
WatermarkText
string WatermarkText
Gets or sets the prompt text shown while the host control is empty.