C# Класс Hourglass.Windows.WatermarkAdorner

An Adorner that displays a watermark on a TextBox or ComboBox control.
Наследование: System.Windows.Documents.Adorner
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
WatermarkAdorner ( UIElement adornedElement, object hint, System.Windows.Media.Brush brush ) : System

Initializes a new instance of the WatermarkAdorner class.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
AdornedElementIsVisibleChanged ( object sender, System.Windows.DependencyPropertyChangedEventArgs e ) : void

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

Описание методов

ArrangeOverride() защищенный Метод

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.
Результат System.Windows.Size

GetVisualChild() защищенный Метод

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.
Результат Visual

MeasureOverride() защищенный Метод

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.
Результат System.Windows.Size

WatermarkAdorner() публичный Метод

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.
Результат System