Table of Contents

Class WatermarkService

Namespace
Loehnert.Utility.Wpf
Assembly
Loehnert.Utility.dll

Represents a helper class that provides the WatermarkProperty.

public static class WatermarkService
Inheritance
WatermarkService
Inherited Members

Fields

WatermarkProperty

This property adds a watermark to the ComboBox, TextBox, PasswordBox and ItemsControl controls.

public static readonly DependencyProperty WatermarkProperty

Field Value

DependencyProperty

Examples

This example adds a watermark text to a TextBox.

<UserControl xmlns:u="http://lisrt.de/utility">
    <TextBox u:WatermarkService.Watermark="This is a watermark"/>
</UserControl>

Methods

GetWatermark(DependencyObject)

Gets the value of the WatermarkProperty.

public static object GetWatermark(DependencyObject d)

Parameters

d DependencyObject

DependencyObject to get the property from.

Returns

object

The value of the Watermark property.

SetWatermark(DependencyObject, object)

Sets the value of the WatermarkProperty.

public static void SetWatermark(DependencyObject d, object value)

Parameters

d DependencyObject

DependencyObject to set the property on.

value object

value of the property.