C# 클래스 Bennedik.Validation.Integration.WPF.ErrorProvider

This ErrorProvider is adapted to the Validation Application Block from Paul Stovell's CodeProject article at http://www.codeproject.com/WPF/wpfvalidation.asp. The ErrorProvider is a Decorator. It adds an EnterpriseValidationRule to all contained Bindings.
(c) 2007, 2008 Martin Bennedik, see BSD license in the license.txt file http://www.bennedik.de
상속: System.Windows.Controls.Decorator
파일 보기 프로젝트 열기: RookieOne/WPF-Input-Validation

Private Properties

프로퍼티 타입 설명
AddEnterpriseValidationRule void
ErrorProvider_Loaded void
FindBindingsRecursively void

공개 메소드들

메소드 설명
ErrorProvider ( ) : System
GetFirstInvalidElement ( ) : FrameworkElement

Returns the first element that this error provider has labelled as invalid. This method is useful to set the users focus on the first visible error field on a page.

Init ( ) : void
Validate ( ) : bool

Validates all properties on the current data source.

Note that only errors on properties that are displayed are included. Other errors, such as errors for properties that are not displayed, will not be validated by this method.

비공개 메소드들

메소드 설명
AddEnterpriseValidationRule ( FrameworkElement element, Binding binding, DependencyProperty dp ) : void
ErrorProvider_Loaded ( object sender, RoutedEventArgs e ) : void
FindBindingsRecursively ( DependencyObject element, FoundBindingCallbackDelegate callbackDelegate ) : void

Recursively goes through the control tree, looking for bindings on the current data context.

메소드 상세

ErrorProvider() 공개 메소드

public ErrorProvider ( ) : System
리턴 System

GetFirstInvalidElement() 공개 메소드

Returns the first element that this error provider has labelled as invalid. This method is useful to set the users focus on the first visible error field on a page.
public GetFirstInvalidElement ( ) : FrameworkElement
리턴 System.Windows.FrameworkElement

Init() 공개 메소드

public Init ( ) : void
리턴 void

Validate() 공개 메소드

Validates all properties on the current data source.
Note that only errors on properties that are displayed are included. Other errors, such as errors for properties that are not displayed, will not be validated by this method.
public Validate ( ) : bool
리턴 bool