C# Class Gu.Wpf.ValidationScope.Scope

Show file Open project: JohanLarsson/Gu.Wpf.ValidationScope

Public Properties

Property Type Description
ErrorEvent System.Windows.RoutedEvent
ErrorsChangedEvent System.Windows.RoutedEvent
ErrorsProperty System.Windows.DependencyProperty
ForInputTypesProperty System.Windows.DependencyProperty
HasErrorProperty System.Windows.DependencyProperty
NodeProperty System.Windows.DependencyProperty
OneWayToSourceBindingsProperty System.Windows.DependencyProperty

Public Methods

Method Description
AddErrorHandler ( DependencyObject element, EventHandler handler ) : void

Adds a handler for the Scope.ValidationError attached event.

AddErrorsChangedHandler ( this element, EventHandler handler ) : void

Adds a handler for the Scope.ErrorsChanged attached event.

RemoveErrorHandler ( DependencyObject element, EventHandler handler ) : void

Removes a handler for the Scope.ValidationError attached event.

RemoveErrorsChangedHandler ( this element, EventHandler handler ) : void

Removes a handler for the Scope.ErrorsChanged attached event.

SetForInputTypes ( FrameworkElement element, InputTypeCollection value ) : void
SetOneWayToSourceBindings ( this element, OneWayToSourceBindings value ) : void

Private Methods

Method Description
GetErrors ( DependencyObject element ) : ReadOnlyObservableCollection
GetForInputTypes ( FrameworkElement element ) : InputTypeCollection
GetHasError ( UIElement element ) : bool
GetNode ( DependencyObject element ) : Node
GetOneWayToSourceBindings ( this element ) : OneWayToSourceBindings
IsScopeFor ( this parent, DependencyObject source ) : bool
IsScopeFor ( this parent, ValidationError error ) : bool
OnForInputTypesChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnNodeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnNodeErrorsChanged ( object sender, ErrorsChangedEventArgs e ) : void
OnWayToSourceBindingsChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
SetErrors ( this element, ReadOnlyObservableCollection value ) : void
SetHasError ( DependencyObject element, bool value ) : void
SetNode ( DependencyObject element, Node value ) : void
Target ( this error ) : DependencyObject
UpdateErrorsAndHasErrors ( DependencyObject dependencyObject, IEnumerable removedErrors, IEnumerable addedErrors, ReadOnlyObservableCollection errors ) : void
UpdateParent ( this source, IEnumerable removed, IEnumerable added ) : void

Method Details

AddErrorHandler() public static method

Adds a handler for the Scope.ValidationError attached event.
public static AddErrorHandler ( DependencyObject element, EventHandler handler ) : void
element System.Windows.DependencyObject UIElement or ContentElement that listens to this event
handler EventHandler Event Handler to be added
return void

AddErrorsChangedHandler() public static method

Adds a handler for the Scope.ErrorsChanged attached event.
public static AddErrorsChangedHandler ( this element, EventHandler handler ) : void
element this UIElement or ContentElement that listens to this event
handler EventHandler Event Handler to be added
return void

RemoveErrorHandler() public static method

Removes a handler for the Scope.ValidationError attached event.
public static RemoveErrorHandler ( DependencyObject element, EventHandler handler ) : void
element System.Windows.DependencyObject UIElement or ContentElement that listens to this event
handler EventHandler Event Handler to be removed
return void

RemoveErrorsChangedHandler() public static method

Removes a handler for the Scope.ErrorsChanged attached event.
public static RemoveErrorsChangedHandler ( this element, EventHandler handler ) : void
element this UIElement or ContentElement that listens to this event
handler EventHandler Event Handler to be removed
return void

SetForInputTypes() public static method

public static SetForInputTypes ( FrameworkElement element, InputTypeCollection value ) : void
element System.Windows.FrameworkElement
value InputTypeCollection
return void

SetOneWayToSourceBindings() public static method

public static SetOneWayToSourceBindings ( this element, OneWayToSourceBindings value ) : void
element this
value OneWayToSourceBindings
return void

Property Details

ErrorEvent public static property

Notifies when validation errors occurs in the scope. Bindings does not need NotifyOnValidationError=True for thhsi event to fire.
public static RoutedEvent,System.Windows ErrorEvent
return System.Windows.RoutedEvent

ErrorsChangedEvent public static property

Notifies when validation errors occurs in the scope. Bindings does not need NotifyOnValidationError=True for thhsi event to fire.
public static RoutedEvent,System.Windows ErrorsChangedEvent
return System.Windows.RoutedEvent

ErrorsProperty public static property

public static DependencyProperty,System.Windows ErrorsProperty
return System.Windows.DependencyProperty

ForInputTypesProperty public static property

public static DependencyProperty,System.Windows ForInputTypesProperty
return System.Windows.DependencyProperty

HasErrorProperty public static property

public static DependencyProperty,System.Windows HasErrorProperty
return System.Windows.DependencyProperty

NodeProperty public static property

public static DependencyProperty,System.Windows NodeProperty
return System.Windows.DependencyProperty

OneWayToSourceBindingsProperty public static property

public static DependencyProperty,System.Windows OneWayToSourceBindingsProperty
return System.Windows.DependencyProperty