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

The implementation of validation management for a portion of a WPF LogicalTree. When FrameworkElement register themseives with the scope, it figures which field they are associated with, typically through the the property name that the element is bound to. The scope also is given a ICollection{T}. When the collection is modified, the scope makes the association between the errors and the logical field that the error should be attached to. Additionally, the scope watches for any WPF Validation errors created by any controls under the scope. If found, they are inserted into the collection. This way the ViewModel layer of an application (which supplied the collection), is now aware of these types of error.
파일 보기 프로젝트 열기: JDolinger/Watchdog 1 사용 예제들

공개 메소드들

메소드 설명
ValidationScope ( FrameworkElement root ) : System

Initializes a new instance of the ValidationScope class.

비공개 메소드들

메소드 설명
HandleDataConversionError ( object sender, System.Windows.Controls.ValidationErrorEventArgs args ) : void
OnAdded ( Watchdog.Validation.Core.ValidationError added ) : void

Called when an IError has been added to the collection. It handles finding the IField with the given fieldKey and adding the error to the field.

OnCleared ( ) : void
OnRemoved ( Watchdog.Validation.Core.ValidationError removed ) : void

Called when an IError has been removed from the collection. It handles finding the IField with the given fieldKey and removing the error to the field.

ReattachConversionErrors ( ) : void
Register ( FrameworkElement element ) : void

메소드 상세

ValidationScope() 공개 메소드

Initializes a new instance of the ValidationScope class.
public ValidationScope ( FrameworkElement root ) : System
root System.Windows.FrameworkElement The root element of the scope where the initial has been attached.
리턴 System