C# Class Catel.Windows.Controls.WarningAndErrorValidator

Control for adding business rule validation to the form. Assign a value or binding to source for the business object or collection of business objects to validate.
Inheritance: System.Windows.Controls.Control, IUniqueIdentifyable
显示文件 Open project: Catel/Catel Class Usage Examples

Public Properties

Property Type Description
AutomaticallyRegisterToInfoBarMessageControlProperty System.Windows.DependencyProperty
SourceProperty System.Windows.DependencyProperty

Public Methods

Method Description
WarningAndErrorValidator ( ) : System

Initializes a new instance of the WarningAndErrorValidator class.

Private Methods

Method Description
AddObjectToWatchList ( object value, IEnumerable parentEnumerable = null ) : void

Adds the object to the watch list.

AddObjectsToWatchList ( IEnumerable values, IEnumerable parentEnumerable ) : void

Adds an IEnumerable of objects to the watch list.

CheckFieldWarningsOrErrors ( object value, string propertyChanged, ValidationType validationType ) : string>.Dictionary

Checks the field warnings or errors.

CheckObjectValidation ( object value, string propertyChanged, IEnumerable parentEnumerable ) : void

Checks a entity that either implements the IDataWarningInfo or IDataErrorInfo on warnings and errors.

Internally calls the generic method with the same name.

CheckObjectValidationForFields ( object value, string propertyChanged, ObservableCollection infoList, ValidationType validationType ) : void

Checks the object validation for fields warnings or errors.

CleanUp ( ) : void

Cleans up.

GetWarningOrError ( object value, ValidationType type ) : string

Gets the warning or error message for the object.

Initialize ( ) : void

Initializes this instance. Loads all the errors and warnings that were added when the control was not yet loaded.

OnLoaded ( object sender, global::Windows.UI.Xaml.RoutedEventArgs e ) : void

Called when the control is loaded.

OnUnloaded ( object sender, global::Windows.UI.Xaml.RoutedEventArgs e ) : void

Called when the control is unloaded.

RaiseBusinessValidationWarningOrError ( object value, string message, ValidationEventAction action, ValidationType type ) : void

Raises an validation warning or error event.

RaiseEventsForAllErrorsAndWarnings ( ) : void

Raises the events for all errors and warnings.

RaiseEventsForDifferences ( object value, ValidationData oldValidationData, ValidationData newValidationData ) : void

Raises the events for differences.

RaiseEventsForDifferencesInBusiness ( object value, ICollection oldBusinessData, ICollection newBusinessData, ValidationType validationType ) : void

Raises the events for differences in business.

RaiseEventsForDifferencesInFields ( object value, ICollection oldFieldData, ICollection newFieldData, ValidationType validationType ) : void

Raises the events for differences in fields.

RemoveObjectFromWatchList ( object value ) : void

Removes the object from watch list.

RemoveObjectsFromWatchList ( IEnumerable values ) : void

Removes an IEnumerable of objects from the watch list.

UpdateSource ( object oldValue, object newValue ) : void

Updates the source.

iNotifyCollectionChanged_CollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void

Handling change of collection updating connections and error messages.

iNotifyPropertyChanged_PropertyChanged ( object sender, PropertyChangedEventArgs e ) : void

Handling changes of properties within entity.

Method Details

WarningAndErrorValidator() public method

Initializes a new instance of the WarningAndErrorValidator class.
public WarningAndErrorValidator ( ) : System
return System

Property Details

AutomaticallyRegisterToInfoBarMessageControlProperty public_oe static_oe property

DependencyProperty definition as the backing store for AutomaticallyRegisterToInfoBarMessageControl.
public static DependencyProperty,System.Windows AutomaticallyRegisterToInfoBarMessageControlProperty
return System.Windows.DependencyProperty

SourceProperty public_oe static_oe property

DependencyProperty definition as the backing store for Source.
public static DependencyProperty,System.Windows SourceProperty
return System.Windows.DependencyProperty