C# Class Hourglass.Windows.WatermarkAdorner

An Adorner that displays a watermark on a TextBox or ComboBox control.
Inheritance: System.Windows.Documents.Adorner
Show file Open project: Dziemborowicz/Hourglass Class Usage Examples

Public Methods

Method Description
WatermarkAdorner ( UIElement adornedElement, object hint, System.Windows.Media.Brush brush ) : System

Initializes a new instance of the WatermarkAdorner class.

Protected Methods

Method Description
ArrangeOverride ( Size finalSize ) : Size

Positions child elements and determines a size for the WatermarkAdorner.

GetVisualChild ( int index ) : Visual

Returns the child at the specified index from the child elements within the element.

MeasureOverride ( Size availableSize ) : Size

Measures the size in layout required for child elements and determines a size for the WatermarkAdorner.

Private Methods

Method Description
AdornedElementIsVisibleChanged ( object sender, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Invoked when the value of the UIElement.IsVisible property changes on the .

Method Details

ArrangeOverride() protected method

Positions child elements and determines a size for the WatermarkAdorner.
protected ArrangeOverride ( Size finalSize ) : Size
finalSize System.Windows.Size The final area within the parent that this element should use to arrange itself and /// its children.
return System.Windows.Size

GetVisualChild() protected method

Returns the child at the specified index from the child elements within the element.
If the provided index is out of range.
protected GetVisualChild ( int index ) : Visual
index int The zero-based index of the requested child element within the element.
return Visual

MeasureOverride() protected method

Measures the size in layout required for child elements and determines a size for the WatermarkAdorner.
protected MeasureOverride ( Size availableSize ) : Size
availableSize System.Windows.Size The available size that this element can give to child elements. Infinity can /// be specified as a value to indicate that the element will size to whatever content is available.
return System.Windows.Size

WatermarkAdorner() public method

Initializes a new instance of the WatermarkAdorner class.
public WatermarkAdorner ( UIElement adornedElement, object hint, System.Windows.Media.Brush brush ) : System
adornedElement UIElement The to apply the watermark to.
hint object The content of the watermark, typically a .
brush System.Windows.Media.Brush The foreground of the watermark.
return System