C# Class System.Waf.Presentation.ValidationHelper

Provides methods and attached properties that support data validation tracking. This works only if NotifyOnValidationError=true is set by every Binding that participates in data validation.
显示文件 Open project: jbe2277/waf

Public Properties

Property Type Description
IsEnabledProperty System.Windows.DependencyProperty
IsValidProperty System.Windows.DependencyProperty

Public Methods

Method Description
GetIsEnabled ( DependencyObject obj ) : bool

Gets a value that indicates whether the ValidationHelper is enabled.

GetIsValid ( DependencyObject obj ) : bool

Gets a value that indicates whether the object is valid.

SetIsEnabled ( DependencyObject obj, bool value ) : void

Sets the value that indicates whether the ValidationHelper is enabled. The default value is 'false'. It is not allowed to call this method with 'false'.

Private Methods

Method Description
CheckBindingMode ( BindingMode bindingMode ) : void
InternalSetIsValid ( DependencyObject obj, bool value ) : void
IsEnabledChangedCallback ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs e ) : void
IsValidChangedCallback ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs e ) : void
SetIsValid ( DependencyObject obj, bool value ) : void

Method Details

GetIsEnabled() public static method

Gets a value that indicates whether the ValidationHelper is enabled.
public static GetIsEnabled ( DependencyObject obj ) : bool
obj System.Windows.DependencyObject The object to read the value from.
return bool

GetIsValid() public static method

Gets a value that indicates whether the object is valid.
public static GetIsValid ( DependencyObject obj ) : bool
obj System.Windows.DependencyObject The object to read the value from.
return bool

SetIsEnabled() public static method

Sets the value that indicates whether the ValidationHelper is enabled. The default value is 'false'. It is not allowed to call this method with 'false'.
The value must not be set to 'false'.
public static SetIsEnabled ( DependencyObject obj, bool value ) : void
obj System.Windows.DependencyObject The object to set the value to.
value bool if set to true then the ValidationHelper is enabled for the specified object.
return void

Property Details

IsEnabledProperty public_oe static_oe property

Identifies the IsEnabled attached property. This property contains the value that indicates whether the ValidationHelper is enabled.
public static DependencyProperty,System.Windows IsEnabledProperty
return System.Windows.DependencyProperty

IsValidProperty public_oe static_oe property

Identifies the IsValid attached property. This property contains the value that indicates whether the associated object is valid.
This is a readonly property. However, it is allowed to define a Binding with the Mode=OneWayToSource for this property.
public static DependencyProperty,System.Windows IsValidProperty
return System.Windows.DependencyProperty