C# 클래스 Watchdog.Validation.Core.Internal.ElementValidationHandler

A manager for a single FrameworkElement. This is the lowest-level in Watchdog, where the controls are forced into error with an artifical dummy binding between two do-nothing DependencyProperty which are attached to the FrameworkElement and marked as invalid.
파일 보기 프로젝트 열기: JDolinger/Watchdog

공개 프로퍼티들

프로퍼티 타입 설명
ValidationSourceProperty System.Windows.DependencyProperty
ValidationTargetProperty System.Windows.DependencyProperty

공개 메소드들

메소드 설명
Clear ( ) : void

Clears the errorHostingBindingExpr of any validation errors.

CreateValError ( ConversionError e ) : void

Creates the val error.

ElementValidationHandler ( FrameworkElement element ) : System

Initializes a new instance of the ElementValidationHandler class. Sets of a WeakReference to the given element. The rest of the invalid mechanisms are not initialized until the first time we need to invalid the element.

GetValidationSource ( DependencyObject obj ) : string

Gets the validation source property value.

GetValidationTarget ( DependencyObject obj ) : string

Gets the validation target property value.

SetValidationSource ( DependencyObject obj, string value ) : void

Sets the validation source property value.

SetValidationTarget ( DependencyObject obj, string value ) : void

Sets the validation target property value.

Show ( string message ) : void

Shows the specified message. This is accomplished by marking the errorHostingBindingExpr as invalid with a ValidationError containing the given message.

비공개 메소드들

메소드 설명
EnsureBinding ( ) : void

Checks for existence (and creates if necessary) the rules and bindings need to flag the control as invalid.

메소드 상세

Clear() 공개 메소드

Clears the errorHostingBindingExpr of any validation errors.
public Clear ( ) : void
리턴 void

CreateValError() 공개 메소드

Creates the val error.
public CreateValError ( ConversionError e ) : void
e ConversionError The e.
리턴 void

ElementValidationHandler() 공개 메소드

Initializes a new instance of the ElementValidationHandler class. Sets of a WeakReference to the given element. The rest of the invalid mechanisms are not initialized until the first time we need to invalid the element.
public ElementValidationHandler ( FrameworkElement element ) : System
element System.Windows.FrameworkElement The element.
리턴 System

GetValidationSource() 공개 정적인 메소드

Gets the validation source property value.
public static GetValidationSource ( DependencyObject obj ) : string
obj System.Windows.DependencyObject The obj.
리턴 string

GetValidationTarget() 공개 정적인 메소드

Gets the validation target property value.
public static GetValidationTarget ( DependencyObject obj ) : string
obj System.Windows.DependencyObject The obj.
리턴 string

SetValidationSource() 공개 정적인 메소드

Sets the validation source property value.
public static SetValidationSource ( DependencyObject obj, string value ) : void
obj System.Windows.DependencyObject The obj.
value string The value.
리턴 void

SetValidationTarget() 공개 정적인 메소드

Sets the validation target property value.
public static SetValidationTarget ( DependencyObject obj, string value ) : void
obj System.Windows.DependencyObject The obj.
value string The value.
리턴 void

Show() 공개 메소드

Shows the specified message. This is accomplished by marking the errorHostingBindingExpr as invalid with a ValidationError containing the given message.
public Show ( string message ) : void
message string The message.
리턴 void

프로퍼티 상세

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

Registers the ValidationSource attached DependencyProperty. This property does nothing but serve as one end of a binding that we use to mark the FrameworkElement as invalid.
public static DependencyProperty,System.Windows ValidationSourceProperty
리턴 System.Windows.DependencyProperty

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

Registers the ValidationTarget attached DependencyProperty. This property does nothing but serve as one end of a binding that we use to mark the FrameworkElement as invalid.
public static DependencyProperty,System.Windows ValidationTargetProperty
리턴 System.Windows.DependencyProperty