C# 클래스 Hourglass.Windows.Watermark

Provides a DependencyProperty that allows a watermark to be applied to TextBox and ComboBox controls when the control has no actual value.
파일 보기 프로젝트 열기: Dziemborowicz/Hourglass

공개 프로퍼티들

프로퍼티 타입 설명
HintBrushProperty System.Windows.DependencyProperty
HintProperty System.Windows.DependencyProperty

공개 메소드들

메소드 설명
GetHint ( Control control ) : object

Returns the value of the HintProperty.

GetHintBrush ( Control control ) : System.Windows.Media.Brush

Returns the value of the HintBrushProperty.

SetHint ( Control control, object value ) : void

Sets the value of the HintProperty.

SetHintBrush ( Control control, System.Windows.Media.Brush value ) : void

Sets the value of the HintBrushProperty.

비공개 메소드들

메소드 설명
AddWatermarkAdorner ( Control control, object hint, System.Windows.Media.Brush brush ) : void

Adds a WatermarkAdorner to a Control.

BindControl ( Control control ) : void

Binds the event handlers for to a Control.

ComboBoxSelectionChanged ( object sender, System.Windows.Controls.SelectionChangedEventArgs e ) : void

Invoked when the selection of a combo box control changes.

ComboBoxTextChanged ( object sender, RoutedEventArgs e ) : void

Invoked when content changes in a combo box control changes.

ControlGotKeyboardFocus ( object sender, System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void

Invoked when the keyboard is focused on a control.

ControlLoaded ( object sender, RoutedEventArgs e ) : void

Invoked when the control is laid out, rendered, and ready for interaction.

ControlLostKeyboardFocus ( object sender, System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void

Invoked when the keyboard is no longer focused on a control.

DependencyPropertyChanged ( DependencyObject sender, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Invoked when the effective value of a DependencyProperty changes.

GetWatermarkAdorner ( Control control ) : WatermarkAdorner

Returns a WatermarkAdorner for a Control, or null if none exists.

HasActualValue ( Control control ) : bool

Returns a value indicating whether a Control has an actual value (where the text property is not null or empty).

RemoveWatermarkAdorner ( Control control ) : void

Removes the WatermarkAdorner from a Control.

TextBoxTextChanged ( object sender, System.Windows.Controls.TextChangedEventArgs e ) : void

Invoked when content changes in a text box control.

UpdateAdornerLayer ( Control control ) : void

Forces the AdornerLayer to re-render.

UpdateWatermark ( Control control ) : void

Updates the WatermarkAdorner on the Control.

메소드 상세

GetHint() 공개 정적인 메소드

Returns the value of the HintProperty.
public static GetHint ( Control control ) : object
control System.Windows.Controls.Control A .
리턴 object

GetHintBrush() 공개 정적인 메소드

Returns the value of the HintBrushProperty.
public static GetHintBrush ( Control control ) : System.Windows.Media.Brush
control System.Windows.Controls.Control A .
리턴 System.Windows.Media.Brush

SetHint() 공개 정적인 메소드

Sets the value of the HintProperty.
public static SetHint ( Control control, object value ) : void
control System.Windows.Controls.Control A .
value object The value to set.
리턴 void

SetHintBrush() 공개 정적인 메소드

Sets the value of the HintBrushProperty.
public static SetHintBrush ( Control control, System.Windows.Media.Brush value ) : void
control System.Windows.Controls.Control A .
value System.Windows.Media.Brush The value to set.
리턴 void

프로퍼티 상세

HintBrushProperty 공개적으로 정적으로 프로퍼티

A DependencyProperty that specifies the foreground of the watermark to be displayed when the control has no actual value and no keyboard focus.
public static DependencyProperty,System.Windows HintBrushProperty
리턴 System.Windows.DependencyProperty

HintProperty 공개적으로 정적으로 프로퍼티

A DependencyProperty that specifies the content of the watermark to be displayed when the control has no actual value and no keyboard focus, typically a string.
public static DependencyProperty,System.Windows HintProperty
리턴 System.Windows.DependencyProperty