Class WatermarkService
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
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
DependencyObjectDependencyObject 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
DependencyObjectDependencyObject to set the property on.
value
objectvalue of the property.