C# Class Hourglass.Windows.WatermarkAdorner

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

Méthodes publiques

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

Initializes a new instance of the WatermarkAdorner class.

Méthodes protégées

Méthode 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

Méthode 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 méthode

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.
Résultat System.Windows.Size

GetVisualChild() protected méthode

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.
Résultat Visual

MeasureOverride() protected méthode

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.
Résultat System.Windows.Size

WatermarkAdorner() public méthode

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.
Résultat System